encdec

package
v0.0.0-...-41d7962 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Width is the width of the network
	Width = 256
	// Offset is the offset
	Offset = Width
	// EncoderCols is the number of encoder columns
	EncoderCols = Width + 256
	// EncoderRows is the number of encoder rows
	EncoderRows = Width
	// EncoderSize is the number of encoder parameters
	EncoderSize = EncoderCols * EncoderRows
	// DecoderCols is the number of decoder columns
	DecoderCols = Width
	// DecoderRows is the number of decoder rows
	DecoderRows = Width + 256
	// DecoderSize is the number of decoder parameters
	DecoderSize = DecoderCols * DecoderRows
)

Variables

This section is empty.

Functions

func Learn

func Learn()

Learn learns the mode

Types

type Distribution

type Distribution struct {
	EncoderWeights []Random
	EncoderBias    []Random
	DecoderWeights []Random
	DecoderBias    []Random
}

Distribution is a distribution of a neural network

func NewDistribution

func NewDistribution(rng *rand.Rand) Distribution

NewDistribution creates a new distribution

func (Distribution) Sample

func (d Distribution) Sample(rng *rand.Rand) Network

Sample samples a network from the distribution

type Network

type Network struct {
	EncoderState   Matrix
	EncoderWeights Matrix
	EncoderBias    Matrix
	DecoderState   Matrix
	DecoderWeights Matrix
	DecoderBias    Matrix
	Loss           float64
}

Network is a neural network

func (*Network) Inference

func (n *Network) Inference(data []byte)

Inference run inference on the network

type Random

type Random struct {
	Mean   float64
	Stddev float64
}

Random is a random variable

Jump to

Keyboard shortcuts

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