111 void randomizeWeights();
159 bool randomizeWeights =
true
191 double *inputNeurons,
192 double *outputNeurons
Lightweight Feedforward Artificial Neural Network (ANN) library tailored for microcontrollers.
Definition diwa.h:92
double * inference(double *inputs)
Perform inference on the neural network.
DiwaError loadFromFile(std::ifstream &annFile)
Load neural network model from file in non-Arduino environment.
void train(double learningRate, double *inputNeurons, double *outputNeurons)
Train the neural network using backpropagation.
DiwaError initialize(int inputNeurons, int hiddenLayers, int hiddenNeurons, int outputNeurons, bool randomizeWeights=true)
Initializes the Diwa neural network with specified parameters.
~Diwa()
Destructor for the Diwa class.
Diwa()
Default constructor for the Diwa class.
DiwaError saveToFile(std::ofstream &annFile)
Save neural network model to file in non-Arduino environment.
DiwaError
Enumeration representing various error codes that may occur during the operation of the Diwa library.
Definition diwa.h:60
@ MALLOC_FAILED
Definition diwa.h:67
@ MODEL_SAVE_ERROR
Definition diwa.h:64
@ STREAM_NOT_OPEN
Definition diwa.h:66
@ MODEL_READ_ERROR
Definition diwa.h:63
@ NO_ERROR
Definition diwa.h:61
@ INVALID_PARAM_VALUES
Definition diwa.h:62
@ INVALID_MAGIC_NUMBER
Definition diwa.h:65