activation

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(class string) func(string, map[string]*pb.Dense, map[string]*pb.Dense) layer.Layer

Types

type Activation

type Activation interface {
	layer.Layer
}

func NewReLU

func NewReLU() Activation

func NewSigmoid

func NewSigmoid() Activation

func NewSoftplus

func NewSoftplus() Activation

func NewTanh

func NewTanh() Activation

type ReLU

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

func (ReLU) Args

func (ReLU) Args() map[string]mat.Matrix

func (ReLU) Backward

func (layer ReLU) Backward(context []mat.Matrix, grad mat.Matrix) (valueGrad mat.Matrix, paramsGrad *params.Params)

func (ReLU) Class

func (layer ReLU) Class() string

func (ReLU) Context

func (ReLU) Context() *params.Params

func (ReLU) Forward

func (layer ReLU) Forward(input mat.Matrix, _ bool) (context []mat.Matrix, output mat.Matrix)

func (ReLU) Name

func (layer ReLU) Name() string

func (ReLU) Params

func (ReLU) Params() *params.Params

func (ReLU) Print

func (layer ReLU) Print()

func (ReLU) SetName

func (layer ReLU) SetName(name string)

func (ReLU) SetTraining

func (ReLU) SetTraining(bool)

type Sigmoid

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

func (Sigmoid) Args

func (Sigmoid) Args() map[string]mat.Matrix

func (Sigmoid) Backward

func (layer Sigmoid) Backward(context []mat.Matrix, grad mat.Matrix) (valueGrad mat.Matrix, paramsGrad *params.Params)

func (Sigmoid) Class

func (layer Sigmoid) Class() string

func (Sigmoid) Context

func (Sigmoid) Context() *params.Params

func (Sigmoid) Forward

func (layer Sigmoid) Forward(input mat.Matrix, _ bool) (context []mat.Matrix, output mat.Matrix)

func (Sigmoid) Name

func (layer Sigmoid) Name() string

func (Sigmoid) Params

func (Sigmoid) Params() *params.Params

func (Sigmoid) Print

func (layer Sigmoid) Print()

func (Sigmoid) SetName

func (layer Sigmoid) SetName(name string)

func (Sigmoid) SetTraining

func (Sigmoid) SetTraining(bool)

type Softplus

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

func (Softplus) Args

func (Softplus) Args() map[string]mat.Matrix

func (Softplus) Backward

func (layer Softplus) Backward(context []mat.Matrix, grad mat.Matrix) (valueGrad mat.Matrix, paramsGrad *params.Params)

func (Softplus) Class

func (layer Softplus) Class() string

func (Softplus) Context

func (Softplus) Context() *params.Params

func (Softplus) Forward

func (layer Softplus) Forward(input mat.Matrix, _ bool) (context []mat.Matrix, output mat.Matrix)

func (Softplus) Name

func (layer Softplus) Name() string

func (Softplus) Params

func (Softplus) Params() *params.Params

func (Softplus) Print

func (layer Softplus) Print()

func (Softplus) SetName

func (layer Softplus) SetName(name string)

func (Softplus) SetTraining

func (Softplus) SetTraining(bool)

type Tanh

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

func (Tanh) Args

func (Tanh) Args() map[string]mat.Matrix

func (Tanh) Backward

func (layer Tanh) Backward(context []mat.Matrix, grad mat.Matrix) (valueGrad mat.Matrix, paramsGrad *params.Params)

func (Tanh) Class

func (layer Tanh) Class() string

func (Tanh) Context

func (Tanh) Context() *params.Params

func (Tanh) Forward

func (layer Tanh) Forward(input mat.Matrix, _ bool) (context []mat.Matrix, output mat.Matrix)

func (Tanh) Name

func (layer Tanh) Name() string

func (Tanh) Params

func (Tanh) Params() *params.Params

func (Tanh) Print

func (layer Tanh) Print()

func (Tanh) SetName

func (layer Tanh) SetName(name string)

func (Tanh) SetTraining

func (Tanh) SetTraining(bool)

Jump to

Keyboard shortcuts

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