gonn

package module
v0.0.0-...-fcc35b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

README

GoNN

Go Neural Network library. Currently very basic and experimental

For a solid primer on Neural Networks and Deep Learning, see http://neuralnetworksanddeeplearning.com/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	SetDefaultActivation(activationType string) Builder
	SetInputCount(numInputs int) Builder
	AddLayer(numNeurons int) Builder
	AddLayerWithActivation(numNeurons int, activationType string) Builder
	Build() *Net
}

Builder is a Builder pattern for creating a new gonn neural network

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new Builder

type Net

type Net struct {
	Layers    []*nn.Layer `json:"layers"`
	NumInputs int         `json:"numInputs"`
}

Net is a simple feedforward neural network

func NewNet

func NewNet(Layers []*nn.Layer, numInputs int) *Net

NewNet creates a new neural network with the given layers

func (*Net) Calculate

func (n *Net) Calculate(inputs []float64) ([][]float64, [][]float64)

Calculate runs the input through the network and returns the z-vectors and activations of each layer. This can be useful for debugging the network, or for training algorithms that require the intermediate values of the network (such as backpropagation).

func (*Net) FeedForward

func (n *Net) FeedForward(inputs []float64) []float64

FeedForward runs the input through the network and returns the output

func (*Net) String

func (n *Net) String() string

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL