mattjoke / pv021-neural-network

0 stars 0 forks source link

Not working on images #10

Open OtoStanko opened 1 year ago

OtoStanko commented 1 year ago

Issue is somewhere with the feedforward in neural_network.cpp line 87. After this call, the "ff" may contain nan/-nan.

Update: It seems like the last layer is making the values go nuts.

OtoStanko commented 1 year ago

Update 2: layer.cpp will produce "inf" inside the wholeSum because of the high values. I will try dividing the inputs by 255.

OtoStanko commented 1 year ago

Update 3: even after the division, the problem will eventually appear.

OtoStanko commented 1 year ago

Update 4: in the backpropagation, weights starts to show some values like: 7.1505302273960515e+300. This was observed after dividing the input values by 255, which decreased the output values to reasonable values. Weights of the top layer were fine. The second last layer already showed the anomalies.

mattjoke commented 1 year ago

What if we manually add a 0.000001 to all outputs? Will this change make the output layer behave properly?