batchnorm

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: BSD-2-Clause Imports: 5 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 {
	nn.Module
	W        *nn.Param
	B        *nn.Param
	Mean     *nn.Buffer
	StdDev   *nn.Buffer
	Momentum *nn.Buffer
}

Model contains the serializable parameters.

func New

func New[T float.DType](size int) *Model

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

func NewWithMomentum

func NewWithMomentum[T float.DType](size int, momentum T) *Model

NewWithMomentum returns a new model with supplied size and momentum.

func (*Model) Forward

func (m *Model) Forward(xs ...mat.Tensor) []mat.Tensor

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

func (*Model) ForwardT

func (m *Model) ForwardT(xs ...mat.Tensor) []mat.Tensor

ForwardT performs the forward step for each input node and returns the result.

Jump to

Keyboard shortcuts

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