adanorm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package adanorm implements the Adaptive Normalization (AdaNorm) method.

Reference: "Understanding and Improving Layer Normalization" by Jingjing Xu, Xu Sun, Zhiyuan Zhang,Guangxiang Zhao, Junyang Lin (2019). (https://papers.nips.cc/paper/8689-understanding-and-improving-layer-normalization.pdf)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	nn.BaseModel
	Scale mat.Float
	// contains filtered or unexported fields
}

Model contains the scaling factor.

func New

func New(scale mat.Float) *Model

New returns a new model.

func (*Model) Forward added in v0.2.0

func (m *Model) Forward(xs ...ag.Node) []ag.Node

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

func (*Model) InitProcessor added in v0.2.0

func (m *Model) InitProcessor()

InitProcessor initializes constants needed by the Forward().

func (*Model) Mean added in v0.2.0

func (m *Model) Mean(xs []ag.Node) []ag.Node

Mean computes the mean of the input.

func (*Model) StdDev added in v0.2.0

func (m *Model) StdDev(meanVectors []ag.Node, xs []ag.Node) []ag.Node

StdDev computes the standard deviation of the input.

Jump to

Keyboard shortcuts

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