node

package
v0.0.0-...-eb36bdb Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

func NewEmptyNode

func NewEmptyNode(cowId int) *Node

func NewNode

func NewNode(
	cowId int,
	adamTDim int,
	nodeId int,
	layerId int,
	nodeType NodeType,
	batchsize int,
	weights []float64,
	bias float64,
	adamAvgMom []float64,
	adamAvgVel []float64,
) *Node

func (*Node) AdamTDim

func (n *Node) AdamTDim() int

func (*Node) BackPropagate

func (nd *Node) BackPropagate(
	cowId int,
	previousNodes *[]*Node,
	previousLayerActiveNodes []index_value.Pair,
	learningRate float64,
	inputId int,
) *Node

func (*Node) BackPropagateFirstLayer

func (nd *Node) BackPropagateFirstLayer(
	cowId int,
	indexValuePairs []index_value.Pair,
	learningRate float64,
	inputId int,
) *Node

func (*Node) Bias

func (n *Node) Bias() float64

func (*Node) ComputeExtaStatsForSoftMax

func (nd *Node) ComputeExtaStatsForSoftMax(
	cowId int,
	normalizationConstant float64,
	inputId int,
	labels []int,
) *Node

func (*Node) CopyWeightsAndBiasFromMirror

func (nd *Node) CopyWeightsAndBiasFromMirror(cowId int) *Node

func (*Node) GetActivation

func (nd *Node) GetActivation(
	cowId int,
	data []index_value.Pair,
	inputId int,
) (float64, *Node)

func (*Node) GetAdamAvgMom

func (n *Node) GetAdamAvgMom(i int) float64

func (*Node) GetAdamAvgMomBias

func (n *Node) GetAdamAvgMomBias() float64

func (*Node) GetAdamAvgVel

func (n *Node) GetAdamAvgVel(i int) float64

func (*Node) GetAdamAvgVelBias

func (n *Node) GetAdamAvgVelBias() float64

func (*Node) GetBias

func (n *Node) GetBias() float64

func (*Node) GetGradient

func (n *Node) GetGradient(
	cowId int,
	weightId, inputId int,
	inputVal float64,
) float64

func (*Node) GetLastActivation

func (n *Node) GetLastActivation(inputId int) float64

func (*Node) GetT

func (n *Node) GetT(i int) float64

func (*Node) GetTBias

func (n *Node) GetTBias() float64

func (*Node) IncrementDelta

func (nd *Node) IncrementDelta(
	cowId, inputId int,
	incrementValue float64,
) *Node

func (*Node) PurturbWeight

func (nd *Node) PurturbWeight(
	cowId int,
	weightId int,
	delta float64,
) (float64, *Node)

for debugging gradients.

func (*Node) SetAdamAvgMom

func (nd *Node) SetAdamAvgMom(cowId, i int, value float64) *Node

func (*Node) SetAdamAvgMomBias

func (nd *Node) SetAdamAvgMomBias(cowId int, value float64) *Node

func (*Node) SetAdamAvgVel

func (nd *Node) SetAdamAvgVel(cowId, i int, value float64) *Node

func (*Node) SetAdamAvgVelBias

func (nd *Node) SetAdamAvgVelBias(cowId int, value float64) *Node

func (*Node) SetBias

func (nd *Node) SetBias(cowId int, value float64) *Node

func (*Node) SetT

func (nd *Node) SetT(cowId, i int, value float64) *Node

func (*Node) SetTBias

func (nd *Node) SetTBias(cowId int, value float64) *Node

func (*Node) SetlastActivation

func (nd *Node) SetlastActivation(
	cowId int,
	inputId int,
	realActivation float64,
) *Node

func (*Node) Update

func (nd *Node) Update(
	cowId int,
	adamTDim int,
	nodeId int,
	layerId int,
	nodeType NodeType,
	batchsize int,
	weights []float64,
	bias float64,
	adamAvgMom []float64,
	adamAvgVel []float64,
	trainBlob []*NodeTrain,
) *Node

func (*Node) Weights

func (n *Node) Weights() []float64

type NodeTrain

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

func NewNodeTrain

func NewNodeTrain(cowId int) *NodeTrain

type NodeType

type NodeType int8
const (
	ReLU NodeType = iota
	Softmax
)

func (NodeType) String

func (nt NodeType) String() string

Jump to

Keyboard shortcuts

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