activation

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activation

type Activation interface {
	Transform(rawPrediction mat.Vector) (mat.Vector, error)
	Type() protobuf.ActivateType
	Name() string
}

Activation is an interface that an activation needs to implement.

type Logistic

type Logistic struct{}

Logistic is struct contains necessary data for doing logistic calculation for now is empty.

func (*Logistic) Name

func (a *Logistic) Name() string

Name returns activation name.

func (*Logistic) Transform

func (a *Logistic) Transform(rawPredictions mat.Vector) (mat.Vector, error)

Transform passes prediction through logistic function.

func (*Logistic) Type

func (a *Logistic) Type() protobuf.ActivateType

Type returns activation type.

type Raw

type Raw struct{}

Raw is struct contains necessary data for doing logistic calculation for now is empty.

func (*Raw) Name

func (a *Raw) Name() string

Name returns activation name.

func (*Raw) Transform

func (a *Raw) Transform(rawPredictions mat.Vector) (mat.Vector, error)

Transform does nothing just returns the raw prediction.

func (*Raw) Type

func (a *Raw) Type() protobuf.ActivateType

Type returns activate type.

type Softmax

type Softmax struct{}

Softmax is struct contains necessary data for doing logistic calculation for now is empty.

func (*Softmax) Name

func (a *Softmax) Name() string

Name returns activation name.

func (*Softmax) Transform

func (a *Softmax) Transform(rawPredictions mat.Vector) (mat.Vector, error)

Transform passes prediction through softmax function.

func (*Softmax) Type

func (a *Softmax) Type() protobuf.ActivateType

Type returns activation type.

Jump to

Keyboard shortcuts

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