Closed lewisrichardson2103 closed 3 years ago
Hello Lewis 👋,
If you are using Arduino's IDE, try going to "file>Preferences", check "compilation" and "Use accessibility features" boxes and then recompile/verify the sketch and post the Output here.
To be honest It's not necessary for the library to have const in this specific case of Layer's constructors but it also shouldn't have had an issue with (or so i think) ... anyways most probably i will fix it in the next days [...] Also have you tested compiling it for other boards like Arduino Uno?
Just for information purposes, it doesn't really slows CPU performance (actually it might even make it faster by ~microseconds [i would say] and i think that it uses a bit less ROM in some specific cases too) the reason i've set it by default not to be used is because the only thing that really changes and makes a difference is related to user/programmer's experience (compared to when it's not enabled/used), is just that the user has to use it in an ambiguous way when using multiple networks on the same sketch (because *me is statically referenced and has to be redefined after the use of another network)
PS. Thanks you ❤️ for bringing this issue to my awareness, i had no idea that it existed [...] (Although it's a weird issue.. i was expecting a warning and no error but whatever lol)
@lewisrichardson2103 I found the issue, I didn't know that i was supposed to use:
Layer(const unsigned int &NumberOfInputs, const unsigned int &NumberOfOutputs, NeuralNetwork * const NN ) // ✅
instead of (what i was using before) :
Layer(const unsigned int &NumberOfInputs, const unsigned int &NumberOfOutputs, const * NeuralNetwork NN ) // 🚫
for the compiler to translate it into a "const pointer to a NeuralNetwork-Object"
Again thanks you ❤️ for bringing this issue to my awareness [...]
Hi again,
If you do not define REDUCE_RAM_STATIC_REFERENCE then you have an issue with const declarations and the pointer to the neural network within the library (*me).
if you include a definition for the reduced ram then this issue goes away
Thanks
Lewis