2024-10-31 16:45:15 +01:00

7 lines
421 B
TeX

The network's weights and biases are initialized randomly using the \texttt{init\_weights} function, which returns a value between 0 and 1. This process is applied to all weights in \texttt{hiddenWeights} and \texttt{outputWeights}, as well as to the biases \texttt{hiddenLayerBias} and \texttt{outputLayerBias}:
\begin{verbatim}
double init_weights() {
return ((double) rand()) / ((double) RAND_MAX);
}
\end{verbatim}