activation

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: BSD-2-Clause Imports: 3 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.BaseModel
	Activation ag.OpName
	Params     []nn.Param
}

Model contains the activation operator and serializable parameters.

func New

func New(activation ag.OpName, params ...nn.Param) *Model

New returns a new model with parameters initialized to zeros. TODO: restrict operators to activation functions only; or create a dedicate builder for each activation.

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.

Jump to

Keyboard shortcuts

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