neuralnetwork

package
v0.0.0-...-dbd0488 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LikeInf

func LikeInf(x float64) bool

func LikeZero

func LikeZero(x float64) bool

func RandomChaos

func RandomChaos() float64

func RandomGuassian

func RandomGuassian(mu, std float64) float64

func RandomLinear

func RandomLinear(a, b float64) float64

func RandomSeed

func RandomSeed()

func RandomStandardGuassian

func RandomStandardGuassian() float64

func Relu

func Relu(x float64) float64

func ReluDerivative

func ReluDerivative(x float64) float64

func Sigmoid

func Sigmoid(x float64) float64

func SigmoidDerivative

func SigmoidDerivative(x float64) float64

func Tanh

func Tanh(x float64) float64

func TanhDerivative

func TanhDerivative(x float64) float64

Types

type ActionOfLayerRecordShadow

type ActionOfLayerRecordShadow interface {
	ResetRecord(layer *LayerRecordShadow)
	Record(layer *LayerRecordShadow)
	InputPlus(layer *LayerRecordShadow, input *SimpleMatrix) *SimpleMatrix
	GradPlus(layer *LayerRecordShadow, grad *SimpleMatrix) *SimpleMatrix
	DeltaUpdate(layer *LayerRecordShadow)
	DeltaApply(layer *LayerRecordShadow, alpha float64)
}

type CacheLayer

type CacheLayer interface {
	LastInput() *SimpleMatrix
	LastOutput() *SimpleMatrix
	LastGrad() *SimpleMatrix
	LoadLastInput(input *SimpleMatrix)
	LoadLastOutput(output *SimpleMatrix)
}

type DeltaLayer

type DeltaLayer interface {
	DeltaN() int
	Delta() []*SimpleMatrix
	CorrectDelta(delta []*SimpleMatrix, offset int)
}

type Layer

type Layer interface {
	CacheLayer
	DeltaLayer
	OutputDim() (int, int)
	InputDim() (int, int)
	// Calculate layer output for given input (forward propagation).
	ForwardProp(input *SimpleMatrix) *SimpleMatrix
	// Calculate input gradient.
	BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix
	// Update layer parameter gradients as calculated from BackwardProp().
	ParamsUpdate(alpha float64)
}

type LayerActivation

type LayerActivation struct {
	LayerBase
	Fun, FunDerivative func(float64) float64
}

func NewLayerActivation

func NewLayerActivation(input_m, input_n int, fun_type string) *LayerActivation

func (*LayerActivation) BackwardProp

func (c *LayerActivation) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerActivation) ForwardProp

func (c *LayerActivation) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerActivation) InputDim

func (c *LayerActivation) InputDim() (int, int)

func (*LayerActivation) OutputDim

func (c *LayerActivation) OutputDim() (int, int)

type LayerBase

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

func (*LayerBase) BackwardProp

func (c *LayerBase) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerBase) CorrectDelta

func (c *LayerBase) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerBase) Delta

func (c *LayerBase) Delta() []*SimpleMatrix

func (*LayerBase) DeltaN

func (c *LayerBase) DeltaN() int

func (*LayerBase) ForwardProp

func (c *LayerBase) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerBase) InputDim

func (c *LayerBase) InputDim() (int, int)

func (*LayerBase) LastGrad

func (c *LayerBase) LastGrad() *SimpleMatrix

func (*LayerBase) LastInput

func (c *LayerBase) LastInput() *SimpleMatrix

func (*LayerBase) LastOutput

func (c *LayerBase) LastOutput() *SimpleMatrix

func (*LayerBase) LoadLastInput

func (c *LayerBase) LoadLastInput(input *SimpleMatrix)

func (*LayerBase) LoadLastOutput

func (c *LayerBase) LoadLastOutput(output *SimpleMatrix)

func (*LayerBase) OutputDim

func (c *LayerBase) OutputDim() (int, int)

func (*LayerBase) ParamsUpdate

func (c *LayerBase) ParamsUpdate(alpha float64)

type LayerConvolution

type LayerConvolution struct {
	LayerBase
	W, B                                         *SimpleMatrix
	DeltaWb                                      []*SimpleMatrix
	WeightDecay                                  float64
	InputM, M, N, ItemM, ItemN, KernelM, KernelN int
}

func NewLayerConvolution

func NewLayerConvolution(
	input_m, input_n, output_n int,
	item_m, item_n, kernel_m, kernel_n int,
	weight_decay float64,
) *LayerConvolution

func (*LayerConvolution) BackwardProp

func (c *LayerConvolution) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerConvolution) CorrectDelta

func (c *LayerConvolution) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerConvolution) Delta

func (c *LayerConvolution) Delta() []*SimpleMatrix

func (*LayerConvolution) DeltaN

func (c *LayerConvolution) DeltaN() int

func (*LayerConvolution) ForwardProp

func (c *LayerConvolution) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerConvolution) InputDim

func (c *LayerConvolution) InputDim() (int, int)

func (*LayerConvolution) OutputDim

func (c *LayerConvolution) OutputDim() (int, int)

func (*LayerConvolution) ParamsUpdate

func (c *LayerConvolution) ParamsUpdate(alpha float64)

type LayerFlatten

type LayerFlatten struct {
	LayerBase
	InputM, InputN int
}

func NewLayerFlatten

func NewLayerFlatten(input_m, input_n int) *LayerFlatten

func (*LayerFlatten) BackwardProp

func (c *LayerFlatten) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerFlatten) CorrectDelta

func (c *LayerFlatten) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerFlatten) Delta

func (c *LayerFlatten) Delta() []*SimpleMatrix

func (*LayerFlatten) DeltaN

func (c *LayerFlatten) DeltaN() int

func (*LayerFlatten) ForwardProp

func (c *LayerFlatten) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerFlatten) InputDim

func (c *LayerFlatten) InputDim() (int, int)

func (*LayerFlatten) OutputDim

func (c *LayerFlatten) OutputDim() (int, int)

func (*LayerFlatten) ParamsUpdate

func (c *LayerFlatten) ParamsUpdate(alpha float64)

type LayerLinear

type LayerLinear struct {
	LayerBase
	W, B                     *SimpleMatrix
	DeltaWb                  []*SimpleMatrix // W, b
	WeightScale, WeightDecay float64
	EnableB                  bool
}

func NewLayerLinear

func NewLayerLinear(input_m, input_n, output_n int, weight_scale, weight_decay float64, enable_b bool) *LayerLinear

func (*LayerLinear) BackwardProp

func (c *LayerLinear) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerLinear) CorrectDelta

func (c *LayerLinear) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerLinear) Delta

func (c *LayerLinear) Delta() []*SimpleMatrix

func (*LayerLinear) DeltaN

func (c *LayerLinear) DeltaN() int

func (*LayerLinear) ForwardProp

func (c *LayerLinear) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerLinear) InputDim

func (c *LayerLinear) InputDim() (int, int)

func (*LayerLinear) OutputDim

func (c *LayerLinear) OutputDim() (int, int)

func (*LayerLinear) ParamsUpdate

func (c *LayerLinear) ParamsUpdate(alpha float64)

type LayerLogRegression

type LayerLogRegression struct {
	LayerBase
	LossMixin
	M, N int
}

func NewLayerLogRegression

func NewLayerLogRegression(input_m, input_n int) *LayerLogRegression

func (*LayerLogRegression) BackwardProp

func (c *LayerLogRegression) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerLogRegression) ForwardProp

func (c *LayerLogRegression) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerLogRegression) InputDim

func (c *LayerLogRegression) InputDim() (int, int)

func (*LayerLogRegression) Loss

func (c *LayerLogRegression) Loss(output, output_pred *SimpleMatrix) *SimpleMatrix

func (*LayerLogRegression) OutputDim

func (c *LayerLogRegression) OutputDim() (int, int)

func (*LayerLogRegression) Setup

func (c *LayerLogRegression) Setup()

type LayerPoolMax

type LayerPoolMax struct {
	LayerBase

	InputM, InputN, ItemM, ItemN int
	M, N, PoolM, PoolN           int
	// contains filtered or unexported fields
}

func NewLayerPoolMax

func NewLayerPoolMax(input_m, input_n, item_n, item_m, pool_m, pool_n int) *LayerPoolMax

func (*LayerPoolMax) BackwardProp

func (c *LayerPoolMax) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerPoolMax) CorrectDelta

func (c *LayerPoolMax) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerPoolMax) Delta

func (c *LayerPoolMax) Delta() []*SimpleMatrix

func (*LayerPoolMax) DeltaN

func (c *LayerPoolMax) DeltaN() int

func (*LayerPoolMax) ForwardProp

func (c *LayerPoolMax) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerPoolMax) InputDim

func (c *LayerPoolMax) InputDim() (int, int)

func (*LayerPoolMax) LastContribution

func (c *LayerPoolMax) LastContribution() *SimpleMatrix

func (*LayerPoolMax) OutputDim

func (c *LayerPoolMax) OutputDim() (int, int)

func (*LayerPoolMax) ParamsUpdate

func (c *LayerPoolMax) ParamsUpdate(alpha float64)

type LayerRecordShadow

type LayerRecordShadow struct {
	LayerShadow
	// contains filtered or unexported fields
}

func NewLayerRecordShadow

func NewLayerRecordShadow(shadow Layer, record_m, record_n int, action ActionOfLayerRecordShadow) *LayerRecordShadow

func (*LayerRecordShadow) BackwardProp

func (c *LayerRecordShadow) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerRecordShadow) Current

func (c *LayerRecordShadow) Current() *SimpleMatrix

func (*LayerRecordShadow) ForwardProp

func (c *LayerRecordShadow) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerRecordShadow) MoveNext

func (c *LayerRecordShadow) MoveNext() *LayerRecordShadow

func (*LayerRecordShadow) MovePrev

func (c *LayerRecordShadow) MovePrev() *LayerRecordShadow

func (*LayerRecordShadow) Next

func (c *LayerRecordShadow) Next() *SimpleMatrix

func (*LayerRecordShadow) ParamsUpdate

func (c *LayerRecordShadow) ParamsUpdate(alpha float64)

func (*LayerRecordShadow) Prev

func (c *LayerRecordShadow) Prev() *SimpleMatrix

func (*LayerRecordShadow) SwitchContext

func (c *LayerRecordShadow) SwitchContext(i int) *LayerRecordShadow

type LayerSelfishShadow

type LayerSelfishShadow struct {
	LayerBase
	Shadow Layer
}

func NewLayerSelfishShadow

func NewLayerSelfishShadow(shadow Layer) *LayerSelfishShadow

func (*LayerSelfishShadow) Activate

func (c *LayerSelfishShadow) Activate(copy_input, copy_output, copy_grad bool) *LayerSelfishShadow

func (*LayerSelfishShadow) BackwardProp

func (c *LayerSelfishShadow) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerSelfishShadow) CorrectDelta

func (c *LayerSelfishShadow) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerSelfishShadow) Delta

func (c *LayerSelfishShadow) Delta() []*SimpleMatrix

func (*LayerSelfishShadow) DeltaN

func (c *LayerSelfishShadow) DeltaN() int

func (*LayerSelfishShadow) ForwardProp

func (c *LayerSelfishShadow) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerSelfishShadow) InputDim

func (c *LayerSelfishShadow) InputDim() (int, int)

func (*LayerSelfishShadow) OutputDim

func (c *LayerSelfishShadow) OutputDim() (int, int)

func (*LayerSelfishShadow) ParamsUpdate

func (c *LayerSelfishShadow) ParamsUpdate(alpha float64)

type LayerShadow

type LayerShadow struct {
	LayerBase
	Shadow Layer
}

func NewLayerShadow

func NewLayerShadow(shadow Layer) *LayerShadow

func (*LayerShadow) BackwardProp

func (c *LayerShadow) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*LayerShadow) CorrectDelta

func (c *LayerShadow) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*LayerShadow) Delta

func (c *LayerShadow) Delta() []*SimpleMatrix

func (*LayerShadow) DeltaN

func (c *LayerShadow) DeltaN() int

func (*LayerShadow) ForwardProp

func (c *LayerShadow) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*LayerShadow) InputDim

func (c *LayerShadow) InputDim() (int, int)

func (*LayerShadow) LastGrad

func (c *LayerShadow) LastGrad() *SimpleMatrix

func (*LayerShadow) LastInput

func (c *LayerShadow) LastInput() *SimpleMatrix

func (*LayerShadow) LastOutput

func (c *LayerShadow) LastOutput() *SimpleMatrix

func (*LayerShadow) LoadLastInput

func (c *LayerShadow) LoadLastInput(input *SimpleMatrix)

func (*LayerShadow) LoadLastOutput

func (c *LayerShadow) LoadLastOutput(output *SimpleMatrix)

func (*LayerShadow) OutputDim

func (c *LayerShadow) OutputDim() (int, int)

func (*LayerShadow) ParamsUpdate

func (c *LayerShadow) ParamsUpdate(alpha float64)

type LossMixin

type LossMixin interface {
	// Calculate mean loss given output and predicted output.
	Loss(output, output_pred *SimpleMatrix) *SimpleMatrix
}

type NeuralChain

type NeuralChain struct {
	LayerBase
	NeuralNetwork
	Layers         []Layer
	InputM, InputN int
}

func NewNeuralChain

func NewNeuralChain() *NeuralChain

func (*NeuralChain) AddLayer

func (n *NeuralChain) AddLayer(layer Layer) NeuralNetwork

func (*NeuralChain) BackwardProp

func (c *NeuralChain) BackwardProp(output_grad *SimpleMatrix) *SimpleMatrix

func (*NeuralChain) CorrectDelta

func (c *NeuralChain) CorrectDelta(delta []*SimpleMatrix, offset int)

func (*NeuralChain) CorrectLayerDelta

func (c *NeuralChain) CorrectLayerDelta(delta []*SimpleMatrix, offset, layerIndex int)

func (*NeuralChain) DefineInputDim

func (c *NeuralChain) DefineInputDim(m, n int) *NeuralChain

func (*NeuralChain) Delta

func (c *NeuralChain) Delta() []*SimpleMatrix

func (*NeuralChain) DeltaN

func (c *NeuralChain) DeltaN() int

func (*NeuralChain) Error

func (n *NeuralChain) Error(predict, expect *SimpleMatrix) float64

func (*NeuralChain) Fit

func (n *NeuralChain) Fit(input, expect *SimpleMatrix, alpha float64) NeuralNetwork

func (*NeuralChain) ForwardProp

func (c *NeuralChain) ForwardProp(input *SimpleMatrix) *SimpleMatrix

func (*NeuralChain) InputDim

func (c *NeuralChain) InputDim() (int, int)

func (*NeuralChain) Learn

func (n *NeuralChain) Learn(predict *SimpleMatrix, expect *SimpleMatrix) NeuralNetwork

func (*NeuralChain) OutputDim

func (c *NeuralChain) OutputDim() (int, int)

func (*NeuralChain) ParamsUpdate

func (c *NeuralChain) ParamsUpdate(alpha float64)

func (*NeuralChain) Predict

func (n *NeuralChain) Predict(input *SimpleMatrix) *SimpleMatrix

func (*NeuralChain) Update

func (n *NeuralChain) Update(alpha float64) NeuralNetwork

type NeuralNetwork

type NeuralNetwork interface {
	AddLayer(layer Layer) NeuralNetwork
	Fit(input, expect *SimpleMatrix, alpha float64) NeuralNetwork
	Predict(input *SimpleMatrix) *SimpleMatrix
	Learn(predict *SimpleMatrix, expect *SimpleMatrix) NeuralNetwork
	Update(alpha float64) NeuralNetwork
}

type NeuralRecurrentChain

type NeuralRecurrentChain struct {
	NeuralChain
}

func NewNeuralRecurrentChain

func NewNeuralRecurrentChain(input_m, input_n int) *NeuralRecurrentChain

func (*NeuralRecurrentChain) AddLayer

func (n *NeuralRecurrentChain) AddLayer(layer Layer) NeuralNetwork

func (*NeuralRecurrentChain) AddRecurrentLayer

func (n *NeuralRecurrentChain) AddRecurrentLayer(layer Layer, recurrence_type string) *NeuralRecurrentChain

func (*NeuralRecurrentChain) PredictRestart

func (n *NeuralRecurrentChain) PredictRestart()

type NopActionOfLayerRecordShadow

type NopActionOfLayerRecordShadow struct {
	ActionOfLayerRecordShadow
}

func (*NopActionOfLayerRecordShadow) DeltaApply

func (a *NopActionOfLayerRecordShadow) DeltaApply(c *LayerRecordShadow, alpha float64)

func (*NopActionOfLayerRecordShadow) DeltaUpdate

func (*NopActionOfLayerRecordShadow) GradPlus

func (*NopActionOfLayerRecordShadow) InputPlus

func (*NopActionOfLayerRecordShadow) Record

func (*NopActionOfLayerRecordShadow) ResetRecord

type RecordInputDelayUpdateOfLayerRecordShadow

type RecordInputDelayUpdateOfLayerRecordShadow struct {
	RecordInputOfLayerRecordShadow
	Delta []*SimpleMatrix
}

func (*RecordInputDelayUpdateOfLayerRecordShadow) DeltaApply

func (*RecordInputDelayUpdateOfLayerRecordShadow) DeltaUpdate

type RecordInputOfLayerRecordShadow

type RecordInputOfLayerRecordShadow struct {
	NopActionOfLayerRecordShadow
}

func (*RecordInputOfLayerRecordShadow) GradPlus

func (*RecordInputOfLayerRecordShadow) Record

type RecordOutputDelayUpdateOfLayerRecordShadow

type RecordOutputDelayUpdateOfLayerRecordShadow struct {
	RecordOutputOfLayerRecordShadow
	Delta []*SimpleMatrix
}

func (*RecordOutputDelayUpdateOfLayerRecordShadow) DeltaApply

func (*RecordOutputDelayUpdateOfLayerRecordShadow) DeltaUpdate

type RecordOutputOfLayerRecordShadow

type RecordOutputOfLayerRecordShadow struct {
	NopActionOfLayerRecordShadow
}

func (*RecordOutputOfLayerRecordShadow) GradPlus

func (*RecordOutputOfLayerRecordShadow) Record

type RecurrenceOfLayerRecordShadow

type RecurrenceOfLayerRecordShadow struct {
	RecordOutputOfLayerRecordShadow
	H, DeltaH *SimpleMatrix
	// contains filtered or unexported fields
}

func (*RecurrenceOfLayerRecordShadow) DeltaApply

func (a *RecurrenceOfLayerRecordShadow) DeltaApply(c *LayerRecordShadow, alpha float64)

func (*RecurrenceOfLayerRecordShadow) DeltaUpdate

func (*RecurrenceOfLayerRecordShadow) GradPlus

func (*RecurrenceOfLayerRecordShadow) Init

func (*RecurrenceOfLayerRecordShadow) InitFill

func (*RecurrenceOfLayerRecordShadow) InputPlus

func (*RecurrenceOfLayerRecordShadow) ResetRecord

type SimpleMatrix

type SimpleMatrix struct {
	M, N int
	Data [][]float64
}

func NewSimpleMatrix

func NewSimpleMatrix(m, n int) *SimpleMatrix

func (*SimpleMatrix) Add

func (X *SimpleMatrix) Add(Y *SimpleMatrix, a1, a2 float64) *SimpleMatrix

func (*SimpleMatrix) Clone

func (X *SimpleMatrix) Clone() *SimpleMatrix

func (*SimpleMatrix) Col

func (X *SimpleMatrix) Col(x int) *SimpleMatrix

func (*SimpleMatrix) ConnectBottom

func (X *SimpleMatrix) ConnectBottom(Y *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) ConnectLeft

func (X *SimpleMatrix) ConnectLeft(Y *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) ConnectRight

func (X *SimpleMatrix) ConnectRight(Y *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) ConnectTop

func (X *SimpleMatrix) ConnectTop(Y *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) Convolute

func (X *SimpleMatrix) Convolute(Kernel *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) Dot

func (*SimpleMatrix) Dump

func (X *SimpleMatrix) Dump()

func (*SimpleMatrix) EltMax

func (X *SimpleMatrix) EltMax() float64

func (*SimpleMatrix) EltMin

func (X *SimpleMatrix) EltMin() float64

func (*SimpleMatrix) EltMul

func (X *SimpleMatrix) EltMul(Y *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) EltSum

func (X *SimpleMatrix) EltSum() float64

func (*SimpleMatrix) Fill

func (X *SimpleMatrix) Fill(x float64) *SimpleMatrix

func (*SimpleMatrix) FillElt

func (X *SimpleMatrix) FillElt(x []float64) *SimpleMatrix

func (*SimpleMatrix) FillGuassian

func (X *SimpleMatrix) FillGuassian(mu, std float64) *SimpleMatrix

func (*SimpleMatrix) FillRandom

func (X *SimpleMatrix) FillRandom(a, b float64) *SimpleMatrix

func (*SimpleMatrix) FillWindow

func (X *SimpleMatrix) FillWindow(y, x int, Y *SimpleMatrix) *SimpleMatrix

func (*SimpleMatrix) FillWindowMap

func (X *SimpleMatrix) FillWindowMap(
	y, x int, Y *SimpleMatrix, f func(float64, float64) float64,
) *SimpleMatrix

func (*SimpleMatrix) Map

func (X *SimpleMatrix) Map(f func(float64) float64) *SimpleMatrix

func (*SimpleMatrix) MapWindow

func (X *SimpleMatrix) MapWindow(m, n, h, w int, f func(float64) float64) *SimpleMatrix

func (*SimpleMatrix) MirrorM

func (X *SimpleMatrix) MirrorM() *SimpleMatrix

func (*SimpleMatrix) MirrorN

func (X *SimpleMatrix) MirrorN() *SimpleMatrix

func (*SimpleMatrix) Pool

func (X *SimpleMatrix) Pool(
	pool_m, pool_n, stride_m, stride_n int, f func(float64, float64) float64, init float64,
) *SimpleMatrix

func (*SimpleMatrix) Reduce

func (X *SimpleMatrix) Reduce(f func(float64, float64) float64, init float64) float64

func (*SimpleMatrix) ReduceWindow

func (X *SimpleMatrix) ReduceWindow(
	m, n, h, w int, f func(float64, float64) float64, init float64,
) float64

func (*SimpleMatrix) Reshape

func (X *SimpleMatrix) Reshape(m, n int) *SimpleMatrix

func (*SimpleMatrix) Row

func (X *SimpleMatrix) Row(x int) *SimpleMatrix

func (*SimpleMatrix) SacleWindow

func (X *SimpleMatrix) SacleWindow(m, n, h, w int, a float64) *SimpleMatrix

func (*SimpleMatrix) Scale

func (X *SimpleMatrix) Scale(a float64) *SimpleMatrix

func (*SimpleMatrix) Softmax

func (X *SimpleMatrix) Softmax() *SimpleMatrix

func (*SimpleMatrix) T

func (X *SimpleMatrix) T() *SimpleMatrix

func (*SimpleMatrix) Window

func (X *SimpleMatrix) Window(y, x, h, w int) *SimpleMatrix

Jump to

Keyboard shortcuts

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