Closed GiorgosXou closed 4 months ago
Additionally declerations here could be reduced to one int i
https://github.com/GiorgosXou/NeuralNetworks/blob/68670d51d5bd1da26b6ae14707ebec4abb0c276a/src/NeuralNetwork.h#L1241-L1252
Ok, it might not be a good idea to resolve this issue considering there's for example this: https://github.com/GiorgosXou/NeuralNetworks/blob/356d3ccd3a79b8d4a4b41a491644be0bbbbda97d/src/NeuralNetwork.h#L2341
One option to replace
for (int i = _numberOfOutputs -1; i >= 0; i--)
replace with
for (unsigned int ii = _numberOfOutputs; ii > 0; ii--)
{
auto i = ii - 1;
//rest of the loop body is unchanged
Thanks I'll probably fix this in couple of hours
Actually I was wrong, I don't need to change that i--
to unsigned at all. (I mean.. I don't think anyone is going to train any neural network with 2,147,483,647 +1 neurons on a layers while using REDUCE_RAM_WEIGHTS_LVL2
, lol)... Anyways, just fixing it right now
How I messed-up signed and unsigned...