Skip to content

teratron/gonn

Repository files navigation

GoNN

Go API Reference 0.4.0 Go Code Status


Description

Neural network library for go.

Visuals

Installation

go get -u github.com/teratron/gonn

Usage

package main

import "github.com/teratron/gonn/pkg/nn"

func main() {
	// New returns a new neural network
	// instance with the default parameters.
	n := nn.New()

	// Dataset.
	input := []float64{.27, .31}
	target := []float64{.7}

	// Training dataset.
	_, _ = n.Train(input, target)
}

Documentation

Properties of Perceptron Neural Network

Name

Neural network architecture name (required field for a config).

Bias

The neuron bias, false or true (required field for a config).

HiddenLayer

Array of the number of neurons in each hidden layer.

ActivationMode

ActivationMode function mode (required field for a config).

Code Activation Description
0 LINEAR Linear/identity
1 RELU ReLu (rectified linear unit)
2 LEAKYRELU Leaky ReLu (leaky rectified linear unit)
3 SIGMOID Logistic, a.k.a. sigmoid or soft step
4 TANH TanH (hyperbolic tangent)

LossMode

The mode of calculation of the total error.

Code Loss Description
0 MSE Mean Squared Error
1 RMSE Root Mean Squared Error
2 ARCTAN Arctan
3 AVG Average

LossLimit

Minimum (sufficient) limit of the average of the error during training.

Rate

Learning coefficient (greater than 0.0 and less than or equal to 1.0).

More documentation is available at the gonn website or on pkg.go.dev.

Examples

You can find examples of neural networks in the example's directory.

Support

Roadmap

Contributing

Authors and acknowledgment

License

MIT License.

Project status

Project at the initial stage.

See the latest commits.