Neural network library for go.
go get -u github.com/teratron/gonn
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)
}
Neural network architecture name (required field for a config).
The neuron bias, false or true (required field for a config).
HiddenLayer
Array of the number of neurons in each hidden layer.
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) |
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 |
Minimum (sufficient) limit of the average of the error during training.
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.
You can find examples of neural networks in the example's directory.
Project at the initial stage.
See the latest commits.