initializers

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Achlioptas

func Achlioptas(m mat.Matrix, generator *rand.LockedRand)

Achlioptas fills the input matrix with values according to the mthod described on "Database-friendly random projections: Johnson-Lindenstrauss with binary coins", by Dimitris Achlioptas 2001 (https://core.ac.uk/download/pdf/82724427.pdf)

func Constant

func Constant(m mat.Matrix, n mat.Float)

Constant fills the input matrix with the value n.

func Gain

func Gain(f ag.OpName) mat.Float

Gain returns a coefficient that help to initialize the params in a way to keep gradients stable. Use it to find the gain value for Xavier initializations.

func Normal

func Normal(m mat.Matrix, mean, std mat.Float, generator *rand.LockedRand)

Normal fills the input matrix with random samples from a normal (Gaussian) distribution.

func Ones

func Ones(m mat.Matrix)

Ones fills the input matrix with the scalar value `1`.

func Uniform

func Uniform(m mat.Matrix, min, max mat.Float, generator *rand.LockedRand)

Uniform fills the input matrix m with a uniform distribution where a is the lower bound and b is the upper bound.

func XavierNormal

func XavierNormal(m mat.Matrix, gain mat.Float, generator *rand.LockedRand)

XavierNormal fills the input matrix with values according to the method described in "Understanding the difficulty of training deep feedforward neural networks" - Glorot, X. & Bengio, Y. (2010), using a normal distribution.

func XavierUniform

func XavierUniform(m mat.Matrix, gain mat.Float, generator *rand.LockedRand)

XavierUniform fills the input `m` with values according to the method described in `Understanding the difficulty of training deep feedforward neural networks` - Glorot, X. & Bengio, Y. (2010), using a uniform distribution.

func Zeros

func Zeros(m mat.Matrix)

Zeros fills the input matrix with the scalar value `0`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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