A neural network library for creating simple and fast models in c++
C++ goes brr...
Simple model with two hidden layers
- Above is an example of a model with two hidden layers used for multiclass classification on the mnist dataset
Initialize a model:
Model model = Model();
Add input layer first (cruical):
model.addLayer(std::unique_ptr<Dense>(input_data, "layer_name"))
Add linear layer (dense) with activation function:
model.addLayer(std::unique_ptr<Dense>(num_neurons, "activation", "layer_name"))
- NB! The layers passed into the method must be smart pointers of the class instance
Train the model:
model.fit(input_data, labels, epochs, learning_rate)
- NB!
labelsmust be one-hot encoded