Note: I wrote this project in 7th grade. It was simply a way for me to learn about basic neural networks at a low level.
Neuro is an open source neural network made with Java :)
Feel free to distribute this program or modify it to your liking.
NOTE: This library currently only supports the Sigmoid activation function.
First download the jar file from Github repository. It will be titled Neuro.jar.
Then, move it into your project directory.
If you are using Eclipse then right click and choose Properties and then Build Path. Under Libraries, click add JAR and select the jar.
If you are using Intellij IDEA then right click on your project and choose Open Module Settings. On the sidebar press Libraries and click the plus button. Choose Java and a box will pop up allowing you to select the jar.
Neuro is super easy and noob friendly to use.
NeuralNetBuilder builder = new NeuralNetBuilder();
builder.setInputSize_(28 * 28);
builder.addHiddenLayer(100);
builder.setOutputSize(2);
NeuralNetwork net = builder.buildNetwork();
float[] inputs = /* some input values */
float[] outputs = net.evaluate(inputs);
If you would like to backpropagate the network then add this code after.
float targets[] = {0.12f, 0.7f};
net.learnFromTargets(targets);
NeuralNetLoader.saveNeuralNet("src/saved_network.net", net);
NeuralNetwork net = NeuralNetLoader.loadNeuralNet("src/saved_network.net");