Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE WITH #define ACTIVATION__PER_LAYER on Ardunio DUE #35

Closed
KillianVoy opened this issue May 27, 2024 · 1 comment
Closed

ISSUE WITH #define ACTIVATION__PER_LAYER on Ardunio DUE #35

KillianVoy opened this issue May 27, 2024 · 1 comment
Labels
Ardunio DUE bug Something isn't working Solved Solved but not closed until next version

Comments

@KillianVoy
Copy link

KillianVoy commented May 27, 2024

Hello, I am currentlly trying to create a NN with different types of activation functions per layers, however when I try to use #define ACTIVATION__PER_LAYER, I get the following errors on Arduino IDE :

 π—¨π—¦π—œπ—‘π—š [Ζ’x] |β€£ Sigmoid |β€£ Tanh |βŒ₯|


 #pragma message( STR(INFORMATION) )
                                   ^
C:\Users\...\Arduino\libraries\NeuralNetwork\src/NeuralNetwork.h:900:9: error: 'activation_Function_ptrs' declared as an 'inline' field
         };
         ^
C:\Users\...\Arduino\libraries\NeuralNetwork\src/NeuralNetwork.h:900:9: error: 'constexpr' needed for in-class initialization of static data member 'float (NeuralNetwork::Layer::* const NeuralNetwork::activation_Function_ptrs [2])(const float&)' of non-integral type [-fpermissive]
C:\Users\...\Arduino\libraries\NeuralNetwork\src/NeuralNetwork.h:943:13: error: 'derivative_Function_ptrs' declared as an 'inline' field
             };
             ^
C:\Users\...Documents\Arduino\libraries\NeuralNetwork\src/NeuralNetwork.h:943:13: error: 'constexpr' needed for in-class initialization of static data member 'float (NeuralNetwork::Layer::* const NeuralNetwork::derivative_Function_ptrs [2])(const float&)' of non-integral type [-fpermissive]

exit status 1

Compilation error: exit status 1"

How can i fix this ? I believe this might be an issue with the gcc version ?

@GiorgosXou GiorgosXou added bug Something isn't working Ardunio DUE labels May 27, 2024
@GiorgosXou
Copy link
Owner

GiorgosXou commented May 28, 2024

Just fixed it, everything should work just fine now. I'm pretty sure it was a gcc version issue releated to inline declaration, indeed.

discord reference

GiorgosXou added a commit that referenced this issue May 28, 2024
…with old versions of `gcc`

I guess i used `inline` for one of those reasons: either because I
shamelessly copy pasted stackoverflow code (most probably lol), OR
because I used to have other files besides the header one and that
didn't work? OR because it felt cool\right or something idk... maybe I
should investigate this at one time. an array of pointers to functions,
definatelly wasn't something I knew at that time...Anyways love you (:
@GiorgosXou GiorgosXou added the Solved Solved but not closed until next version label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ardunio DUE bug Something isn't working Solved Solved but not closed until next version
Projects
None yet
Development

No branches or pull requests

2 participants