GiorgosXou / NeuralNetworks

A resource-conscious neural network implementation for MCUs
MIT License
70 stars 21 forks source link

Comment out the errors #10

Closed expeon07 closed 2 years ago

expeon07 commented 2 years ago

Comment out the lines the give out errors. Not sure whether they are necessary. // #define LOVE \nā¤ š–€š–“š–ˆš–”š–“š–‰š–Žš–™š–Žš–”š–“š–†š–‘ š•·š–”š–›š–Š ā¤ // #pragma message( STR(INFORMATION) )

GiorgosXou commented 2 years ago

They are kind of unnecessary (they are mostly reminders*), but it makes no sense why those two lines would produce any kind of errors (maybe encoding ones?)... could you please comment where and how do you compile it? what version of gcc or g++ or Arduino do you use and what the error messages tell you?

*those macros are mainly being used as reminds, to let users know whether or not they are able to use specific features of the library based on the user's defined function & property preferences. Could you try just removing LOVE from #define INFORMATION and let me know if it compiles, like so:

// #define LOVE \nheart š–€š–“š–ˆš–”š–“š–‰š–Žš–™š–Žš–”š–“š–†š–‘ š•·š–”š–›š–Š heart
...
#define INFORMATION MSG0 MSG1 MSG2 ... \\ <--- LOVE IS REMOVED
#pragma message( STR(INFORMATION) )
expeon07 commented 2 years ago

Hi, I'm using the Arduino IDE to upload the code on an Arduino Uno. image I get this error after following your suggestion

GiorgosXou commented 2 years ago

This doesn't look as an error, what you are looking at is an indication\note\reminder that the macro #prgma message( STR(INFORMATION) ) was executed and the output of it was [ʒx] |ā€£ Sigmoid |ā€£ Tanh |āŒ„| which means that you used\defined Sigmoid & Tanh functions inside your sketch

GiorgosXou commented 2 years ago

could you please copy & paste the whole console output?

expeon07 commented 2 years ago

Hi, here is the whole output

In file included from Arduino/libraries/NeuralNetwork/examples/Any_Activation_Function_Per_Layer/Any_Activation_Function_Per_Layer.ino:8:0:
Arduino/libraries/NeuralNetwork/src/NeuralNetwork.h:304:35: note: #pragma message: 
[ʒx] |ā€£ Sigmoid |ā€£ Tanh |āŒ„|
 #pragma message( STR(INFORMATION) )
                                   ^
Sketch uses 8484 bytes (26%) of program storage space. Maximum is 32256 bytes.
Global variables use 398 bytes (19%) of dynamic memory, leaving 1650 bytes for local variables. Maximum is 2048 bytes.
GiorgosXou commented 2 years ago

This is not an error, this is a note\message\reminder that your sketch\code uses Sigmoid and Tanh, it literally says /NeuralNetwork.h:304:35: note: #pragma message

And It compiles Successfully:

Sketch uses 8484 bytes (26%) of program storage space. Maximum is 32256 bytes.
Global variables use 398 bytes (19%) of dynamic memory, leaving 1650 bytes for local variables. Maximum is 2048 bytes.