Skip to content

ulrikisdahl/Neural-network-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Neural Networks

A neural network library for creating simple and fast models in c++

Why?

C++ goes brr...

Example

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

Syntax


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! labels must be one-hot encoded

About

A deep learning library for c++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages