model

package
v0.0.0-...-5072ca2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeBiasGradient

func ComputeBiasGradient(gradZ [][]float64) []float64

Types

type GCN

type GCN struct {
	Layers    []*Layer
	NLayers   int
	NFeatures int
	NHidden   int
	NClasses  int
	Dropout   float64
	// contains filtered or unexported fields
}

func NewGCN

func NewGCN(nLayers, nFeatures, nHidden, nClasses int, dropout, lr float64) *GCN

func (*GCN) Backward

func (g *GCN) Backward(gradOutput [][]float64)

func (*GCN) Eval

func (g *GCN) Eval()

func (*GCN) Forward

func (g *GCN) Forward(x, adj [][]float64) [][]float64

func (*GCN) SGDUpdateWeights

func (gcn *GCN) SGDUpdateWeights(learningRate float64)

func (*GCN) Train

func (g *GCN) Train()

type Layer

type Layer struct {
	InFeatures  int
	OutFeatures int
	Weights     [][]float64
	Bias        []float64

	H [][]float64
	Z [][]float64
	// contains filtered or unexported fields
}

func NewLayer

func NewLayer(inFeatures, outFeatures int) *Layer

func NewLayerFromWeightsAndBias

func NewLayerFromWeightsAndBias(weights [][]float64, bias []float64) *Layer

func (*Layer) AdamUpdate

func (l *Layer) AdamUpdate(beta1, beta2, epsilon, weightDecay float64)

func (*Layer) Backward

func (l *Layer) Backward(gradOutput [][]float64)

func (*Layer) Forward

func (l *Layer) Forward(input [][]float64, adj [][]float64) [][]float64

func (*Layer) ResetWeightsAndBias

func (l *Layer) ResetWeightsAndBias()

func (*Layer) SGDUpdate

func (l *Layer) SGDUpdate(learningRate float64)

Jump to

Keyboard shortcuts

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