activation

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sigmoid

type Sigmoid struct{}

func (Sigmoid) MatrixDerivative

func (s Sigmoid) MatrixDerivative(outputs mat.Matrix) (*mat.Dense, error)

MatrixDerivative assumes the given output values are sigmoid(v), then this function

computes sigmoidPrime as sigmoid(v) * (1 - sigmoid(v))

func (Sigmoid) Value

func (s Sigmoid) Value(v float64) float64

Value computes the sigmoid for activation of a single value.

type Tanh

type Tanh struct{}

func (Tanh) MatrixDerivative

func (s Tanh) MatrixDerivative(outputs mat.Matrix) (*mat.Dense, error)

MatrixDerivative assumes the given output values are tanh(v), then this function

computes tanhPrime as 1 - tanh(v)^2

func (Tanh) Value

func (s Tanh) Value(v float64) float64

Value computes the hyperbolic tangent for activation of a single value.

Jump to

Keyboard shortcuts

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