layer

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

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

func New

func New(
	cowId int,
	numOfNodes int,
	previousLayerNumOfNodes int,
	layerId int,
	nodeType node.NodeType,
	batchSize int,
	k int,
	l int,
	rangePow int,
	sparsity float64,
	weights []float64,
	bias []float64,
	adamAvgMom []float64,
	adamAvgVel []float64,
) *Layer

func (*Layer) ClearHashTables

func (l *Layer) ClearHashTables()

func (*Layer) GetAllNodes

func (l *Layer) GetAllNodes() []*node.Node

func (*Layer) GetHashForInputProcessing

func (l *Layer) GetHashForInputProcessing(weights []float64) []int

func (*Layer) GetNodeById

func (l *Layer) GetNodeById(nodeId int) *node.Node

func (*Layer) GetNomalizationConstant

func (l *Layer) GetNomalizationConstant(inputId int) float64

func (*Layer) HashTablesAdd

func (l *Layer) HashTablesAdd(indices []int, id int) []int

func (*Layer) HashesToIndex

func (l *Layer) HashesToIndex(hashes []int) []int

func (*Layer) NumOfNodes

func (l *Layer) NumOfNodes() int

func (*Layer) QueryActiveNodeAndComputeActivations

func (la *Layer) QueryActiveNodeAndComputeActivations(
	cowId int,
	activeNodesPerLayer [][]index_value.Pair,
	layerIndex int,
	inputId int,
	label []int,
	sparsity float64,
) (int, *Layer)

func (*Layer) UpdateRandomNodes

func (l *Layer) UpdateRandomNodes()

func (*Layer) UpdateTable

func (la *Layer) UpdateTable(cowId int) *Layer

TODO: duplicated code from New

Jump to

Keyboard shortcuts

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