initializer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binomial

type Binomial struct {
	// contains filtered or unexported fields
}

func NewBinomial

func NewBinomial(n, p float64) *Binomial

func (*Binomial) Rand

func (rand *Binomial) Rand() float64

func (*Binomial) RandN

func (rand *Binomial) RandN(n int) []float64

func (*Binomial) RandShape

func (rand *Binomial) RandShape(m, n int) []float64

type Initializer

type Initializer interface {
	Rand() float64
	RandN(n int) []float64
	RandShape(m, n int) []float64
}

type Normal

type Normal struct {
	// contains filtered or unexported fields
}

func NewNormal

func NewNormal(mean, stddev float64) *Normal

func (*Normal) Rand

func (rand *Normal) Rand() float64

func (*Normal) RandN

func (rand *Normal) RandN(n int) []float64

func (*Normal) RandShape

func (rand *Normal) RandShape(m, n int) []float64

type Number

type Number struct {
	// contains filtered or unexported fields
}

func NewNumber

func NewNumber(n float64) *Number

func (*Number) Rand

func (rand *Number) Rand() float64

func (*Number) RandN

func (rand *Number) RandN(n int) []float64

func (*Number) RandShape

func (rand *Number) RandShape(m, n int) []float64

type Uniform

type Uniform struct {
	// contains filtered or unexported fields
}

func NewUniform

func NewUniform(min, max float64) *Uniform

func (*Uniform) Rand

func (rand *Uniform) Rand() float64

func (*Uniform) RandN

func (rand *Uniform) RandN(n int) []float64

func (*Uniform) RandShape

func (rand *Uniform) RandShape(m, n int) []float64

type XavierUniform

type XavierUniform struct {
	// contains filtered or unexported fields
}

func NewXavierUniform

func NewXavierUniform(gain float64) *XavierUniform

func (*XavierUniform) Rand

func (rand *XavierUniform) Rand() float64

func (*XavierUniform) RandN

func (rand *XavierUniform) RandN(n int) []float64

func (*XavierUniform) RandShape

func (rand *XavierUniform) RandShape(m, n int) []float64

Jump to

Keyboard shortcuts

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