batchnorm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	W        *nn.Param `type:"weights"`
	B        *nn.Param `type:"biases"`
	Mean     *nn.Param `type:"undefined"`
	StdDev   *nn.Param `type:"undefined"`
	Momentum *nn.Param `type:"undefined"`
}

Model contains the serializable parameters.

func New

func New(size int) *Model

New returns a new model with the supplied size and default momentum

func NewWithMomentum

func NewWithMomentum(size int, momentum float64) *Model

New returns a new model with supplied size and momentum

func (*Model) NewProc

func (m *Model) NewProc(ctx nn.Context) nn.Processor

NewProc returns a new processor to execute the forward step.

type Processor

type Processor struct {
	nn.BaseProcessor
	// contains filtered or unexported fields
}

func (*Processor) Forward

func (p *Processor) Forward(xs ...ag.Node) []ag.Node

Forward performs the forward step for each input and returns the result.

func (*Processor) Mean

func (p *Processor) Mean(xs []ag.Node) ag.Node

func (*Processor) StdDev

func (p *Processor) StdDev(meanVector ag.Node, xs []ag.Node) ag.Node

Jump to

Keyboard shortcuts

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