Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.23 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.23 KB

GoNN - Go Neural Network

A simple neural network written in Go for learning purpose

Examples

Check the examples folder for some examples of how to use the library. The examples are split in pairs of two main features of the library:

  • Training a network
  • Predicting with a trained network

For example, the examples/sum-train folder contains the code to train a network to sum two numbers, while the examples/sum-predict folder contains the code to predict the sum of two numbers with a trained network. Running it will generate a checkpoint file that will serve as our network model (in this example sum-relu-checkpoint.gob.gz).

The second folder, examples/sum-predict, contains the code to predict the sum of two numbers with a trained network. It will load the checkpoint file generated by the training example (sum-relu-checkpoint.gob.gz) and use it to predict the sum of two numbers.

Running the examples

Please, always run the train example before running the predict example.

Running sum training:

go run examples/sum-train/main.go

It will train the model and save it in a checkpoint file called sum-relu-checkpoint.gob.gz.

To run the sum prediction example:

go run examples/sum-predict/main.go