nn

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActivationReLu    = "relu"
	ActivationSoftmax = "softmax"
)

Variables

View Source
var ErrEmptyLayers = errors.New("empty layers")

Functions

func Solve

Types

type Layer

type Layer struct {
	Activation string
	Size       [2]int
	Dropout    float64
}

type NeuralNetwork

type NeuralNetwork struct {
	// contains filtered or unexported fields
}

func NewNeuralNetwork

func NewNeuralNetwork(g *gorgonia.ExprGraph, layers []Layer) (*NeuralNetwork, error)

func (*NeuralNetwork) Forward

func (m *NeuralNetwork) Forward(x *gorgonia.Node) (err error)

func (*NeuralNetwork) GetGraph

func (m *NeuralNetwork) GetGraph() *gorgonia.ExprGraph

func (*NeuralNetwork) GetVal

func (m *NeuralNetwork) GetVal() gorgonia.Value

func (*NeuralNetwork) Learn

func (m *NeuralNetwork) Learn(y *gorgonia.Node) error

func (*NeuralNetwork) Learnables

func (m *NeuralNetwork) Learnables() gorgonia.Nodes

Jump to

Keyboard shortcuts

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