Documentation ¶
Index ¶
- func Im2Row(input, output []float64, ...)
- func InputAddPixel(input []float64, val float64, ...)
- func InputGetPixel(input []float64, featureMaps, featureMapSize, pad, b, fm, row, col int) float64
- func PrintMatrix(m mat.Matrix)
- func Row2Im(input, output []float64, ...)
- func TransformColview(input, output []float64, batchSize, featureMaps, featureMapSize int)
- type ActivationFunction
- type ConvolutionalLayer
- func (layer *ConvolutionalLayer) Activation() []float64
- func (layer *ConvolutionalLayer) Backpropagate()
- func (layer *ConvolutionalLayer) CalculateGradients()
- func (layer *ConvolutionalLayer) Delta() []float64
- func (layer *ConvolutionalLayer) Forward()
- func (layer *ConvolutionalLayer) Initialize(init Initializer)
- func (layer *ConvolutionalLayer) Input() []float64
- func (layer *ConvolutionalLayer) Load() error
- func (layer *ConvolutionalLayer) Name(name ...string) string
- func (layer *ConvolutionalLayer) Persist() error
- func (layer *ConvolutionalLayer) PreDelta() []float64
- func (layer *ConvolutionalLayer) SetDelta(rawDelta []float64)
- func (layer *ConvolutionalLayer) SetInput(rawInput []float64)
- func (layer *ConvolutionalLayer) SetOptimizerInitializer(opt OptimizerInitializer)
- func (layer *ConvolutionalLayer) Update(learningRate float64)
- func (layer *ConvolutionalLayer) WithName(name string) *ConvolutionalLayer
- type Dataset
- type DenseLayer
- func (layer *DenseLayer) Activation() []float64
- func (layer *DenseLayer) Backpropagate()
- func (layer *DenseLayer) CalculateGradients()
- func (layer *DenseLayer) Delta() []float64
- func (layer *DenseLayer) Draw(filename string)
- func (layer *DenseLayer) Forward()
- func (layer *DenseLayer) Initialize(init Initializer)
- func (layer *DenseLayer) Input() []float64
- func (layer *DenseLayer) PreDelta() []float64
- func (layer *DenseLayer) SetDelta(rawDelta []float64)
- func (layer *DenseLayer) SetInput(rawInput []float64)
- func (layer *DenseLayer) SetOptimizerInitializer(opt OptimizerInitializer)
- func (layer *DenseLayer) Update(learningRate float64)
- type Drawer
- type DropoutLayer
- func (layer *DropoutLayer) Activation() []float64
- func (layer *DropoutLayer) Backpropagate()
- func (layer *DropoutLayer) CalculateGradients()
- func (layer *DropoutLayer) Delta() []float64
- func (layer *DropoutLayer) EnablePredictMode()
- func (layer *DropoutLayer) EnableTrainMode()
- func (layer *DropoutLayer) Forward()
- func (layer *DropoutLayer) Initialize(init Initializer)
- func (layer *DropoutLayer) Input() []float64
- func (layer *DropoutLayer) PreDelta() []float64
- func (layer *DropoutLayer) SetDelta(rawDelta []float64)
- func (layer *DropoutLayer) SetInput(rawInput []float64)
- func (layer *DropoutLayer) SetOptimizerInitializer(opt OptimizerInitializer)
- func (layer *DropoutLayer) Update(learningRate float64)
- type Engine
- type ErrorLayer
- type Initializer
- type InitializerFunc
- type Layer
- type MaxpoolLayer
- func (layer *MaxpoolLayer) Activation() []float64
- func (layer *MaxpoolLayer) Backpropagate()
- func (layer *MaxpoolLayer) CalculateGradients()
- func (layer *MaxpoolLayer) Delta() []float64
- func (layer *MaxpoolLayer) Forward()
- func (layer *MaxpoolLayer) Initialize(init Initializer)
- func (layer *MaxpoolLayer) Input() []float64
- func (layer *MaxpoolLayer) PreDelta() []float64
- func (layer *MaxpoolLayer) SetDelta(rawDelta []float64)
- func (layer *MaxpoolLayer) SetInput(rawInput []float64)
- func (layer *MaxpoolLayer) SetOptimizerInitializer(opt OptimizerInitializer)
- func (layer *MaxpoolLayer) Update(learningRate float64)
- type ModeToggler
- type Network
- func (n *Network) Add(layer Layer)
- func (n *Network) Backpropagate()
- func (n *Network) CalculateGradients()
- func (n *Network) Delta() []float64
- func (n *Network) Draw()
- func (n *Network) EnablePredictMode()
- func (n *Network) EnableTrainMode()
- func (n *Network) Error() float64
- func (n *Network) Forward()
- func (n *Network) Initialize()
- func (n *Network) Input() []float64
- func (n *Network) Load()
- func (n *Network) Output() []float64
- func (n *Network) Persist()
- func (n *Network) Update(learningRate float64)
- type Optimizer
- type OptimizerInitializer
- type PersistableLayer
- type PreparationLayer
- func (layer *PreparationLayer) Activation() []float64
- func (layer *PreparationLayer) Backpropagate()
- func (layer *PreparationLayer) CalculateGradients()
- func (layer *PreparationLayer) Delta() []float64
- func (layer *PreparationLayer) Forward()
- func (layer *PreparationLayer) Initialize(init Initializer)
- func (layer *PreparationLayer) Input() []float64
- func (layer *PreparationLayer) PreDelta() []float64
- func (layer *PreparationLayer) SetDelta(rawDelta []float64)
- func (layer *PreparationLayer) SetInput(rawInput []float64)
- func (layer *PreparationLayer) SetOptimizerInitializer(opt OptimizerInitializer)
- func (layer *PreparationLayer) Update(learningRate float64)
- type SoftmaxLayer
- func (layer *SoftmaxLayer) Activation() []float64
- func (layer *SoftmaxLayer) Backpropagate()
- func (layer *SoftmaxLayer) CalculateGradients()
- func (layer *SoftmaxLayer) Delta() []float64
- func (layer *SoftmaxLayer) Error() float64
- func (layer *SoftmaxLayer) Forward()
- func (layer *SoftmaxLayer) Initialize(init Initializer)
- func (layer *SoftmaxLayer) Input() []float64
- func (layer *SoftmaxLayer) PreDelta() []float64
- func (layer *SoftmaxLayer) SetDelta(delta []float64)
- func (layer *SoftmaxLayer) SetInput(input []float64)
- func (layer *SoftmaxLayer) SetOptimizerInitializer(opt OptimizerInitializer)
- func (layer *SoftmaxLayer) Update(learningRate float64)
- type UpdateFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputAddPixel ¶
func InputGetPixel ¶
func PrintMatrix ¶
func TransformColview ¶
Types ¶
type ActivationFunction ¶
type ConvolutionalLayer ¶
type ConvolutionalLayer struct {
// contains filtered or unexported fields
}
func NewConvolutionalLayer ¶
func NewConvolutionalLayer(batchSize, inDepth, inWidth, kernCount, kernWidth, stride, pad int, activationFunction ActivationFunction) *ConvolutionalLayer
func (*ConvolutionalLayer) Activation ¶
func (layer *ConvolutionalLayer) Activation() []float64
func (*ConvolutionalLayer) Backpropagate ¶
func (layer *ConvolutionalLayer) Backpropagate()
func (*ConvolutionalLayer) CalculateGradients ¶
func (layer *ConvolutionalLayer) CalculateGradients()
func (*ConvolutionalLayer) Delta ¶
func (layer *ConvolutionalLayer) Delta() []float64
func (*ConvolutionalLayer) Forward ¶
func (layer *ConvolutionalLayer) Forward()
func (*ConvolutionalLayer) Initialize ¶
func (layer *ConvolutionalLayer) Initialize(init Initializer)
func (*ConvolutionalLayer) Input ¶
func (layer *ConvolutionalLayer) Input() []float64
func (*ConvolutionalLayer) Load ¶
func (layer *ConvolutionalLayer) Load() error
func (*ConvolutionalLayer) Name ¶
func (layer *ConvolutionalLayer) Name(name ...string) string
func (*ConvolutionalLayer) Persist ¶
func (layer *ConvolutionalLayer) Persist() error
func (*ConvolutionalLayer) PreDelta ¶
func (layer *ConvolutionalLayer) PreDelta() []float64
func (*ConvolutionalLayer) SetDelta ¶
func (layer *ConvolutionalLayer) SetDelta(rawDelta []float64)
func (*ConvolutionalLayer) SetInput ¶
func (layer *ConvolutionalLayer) SetInput(rawInput []float64)
func (*ConvolutionalLayer) SetOptimizerInitializer ¶
func (layer *ConvolutionalLayer) SetOptimizerInitializer(opt OptimizerInitializer)
func (*ConvolutionalLayer) Update ¶
func (layer *ConvolutionalLayer) Update(learningRate float64)
func (*ConvolutionalLayer) WithName ¶
func (layer *ConvolutionalLayer) WithName(name string) *ConvolutionalLayer
type DenseLayer ¶
type DenseLayer struct {
// contains filtered or unexported fields
}
func NewDenseLayer ¶
func NewDenseLayer(batchSize, fanIn, fanOut int, activationFunction ActivationFunction) *DenseLayer
func (*DenseLayer) Activation ¶
func (layer *DenseLayer) Activation() []float64
func (*DenseLayer) Backpropagate ¶
func (layer *DenseLayer) Backpropagate()
func (*DenseLayer) CalculateGradients ¶
func (layer *DenseLayer) CalculateGradients()
func (*DenseLayer) Delta ¶
func (layer *DenseLayer) Delta() []float64
func (*DenseLayer) Draw ¶
func (layer *DenseLayer) Draw(filename string)
func (*DenseLayer) Forward ¶
func (layer *DenseLayer) Forward()
func (*DenseLayer) Initialize ¶
func (layer *DenseLayer) Initialize(init Initializer)
func (*DenseLayer) Input ¶
func (layer *DenseLayer) Input() []float64
func (*DenseLayer) PreDelta ¶
func (layer *DenseLayer) PreDelta() []float64
func (*DenseLayer) SetDelta ¶
func (layer *DenseLayer) SetDelta(rawDelta []float64)
func (*DenseLayer) SetInput ¶
func (layer *DenseLayer) SetInput(rawInput []float64)
func (*DenseLayer) SetOptimizerInitializer ¶
func (layer *DenseLayer) SetOptimizerInitializer(opt OptimizerInitializer)
func (*DenseLayer) Update ¶
func (layer *DenseLayer) Update(learningRate float64)
type DropoutLayer ¶
type DropoutLayer struct {
// contains filtered or unexported fields
}
func NewDropoutLayer ¶
func NewDropoutLayer(batchSize, fanIn int, dropout float64) *DropoutLayer
func (*DropoutLayer) Activation ¶
func (layer *DropoutLayer) Activation() []float64
func (*DropoutLayer) Backpropagate ¶
func (layer *DropoutLayer) Backpropagate()
func (*DropoutLayer) CalculateGradients ¶
func (layer *DropoutLayer) CalculateGradients()
func (*DropoutLayer) Delta ¶
func (layer *DropoutLayer) Delta() []float64
func (*DropoutLayer) EnablePredictMode ¶
func (layer *DropoutLayer) EnablePredictMode()
func (*DropoutLayer) EnableTrainMode ¶
func (layer *DropoutLayer) EnableTrainMode()
func (*DropoutLayer) Forward ¶
func (layer *DropoutLayer) Forward()
func (*DropoutLayer) Initialize ¶
func (layer *DropoutLayer) Initialize(init Initializer)
func (*DropoutLayer) Input ¶
func (layer *DropoutLayer) Input() []float64
func (*DropoutLayer) PreDelta ¶
func (layer *DropoutLayer) PreDelta() []float64
func (*DropoutLayer) SetDelta ¶
func (layer *DropoutLayer) SetDelta(rawDelta []float64)
func (*DropoutLayer) SetInput ¶
func (layer *DropoutLayer) SetInput(rawInput []float64)
func (*DropoutLayer) SetOptimizerInitializer ¶
func (layer *DropoutLayer) SetOptimizerInitializer(opt OptimizerInitializer)
func (*DropoutLayer) Update ¶
func (layer *DropoutLayer) Update(learningRate float64)
type Engine ¶
type ErrorLayer ¶
type Initializer ¶
type InitializerFunc ¶
func (InitializerFunc) Initialize ¶
func (initializerFunction InitializerFunc) Initialize(m *mat.Dense)
type Layer ¶
type Layer interface { Initialize(init Initializer) Forward() Backpropagate() CalculateGradients() Update(learningRate float64) SetDelta(rawDelta []float64) SetInput(rawInput []float64) SetOptimizerInitializer(opt OptimizerInitializer) Delta() []float64 PreDelta() []float64 Input() []float64 Activation() []float64 }
type MaxpoolLayer ¶
type MaxpoolLayer struct {
// contains filtered or unexported fields
}
func NewMaxpoolLayer ¶
func NewMaxpoolLayer(batchSize, inDepth, inWidth, poolSize, stride int) *MaxpoolLayer
func (*MaxpoolLayer) Activation ¶
func (layer *MaxpoolLayer) Activation() []float64
func (*MaxpoolLayer) Backpropagate ¶
func (layer *MaxpoolLayer) Backpropagate()
func (*MaxpoolLayer) CalculateGradients ¶
func (layer *MaxpoolLayer) CalculateGradients()
func (*MaxpoolLayer) Delta ¶
func (layer *MaxpoolLayer) Delta() []float64
func (*MaxpoolLayer) Forward ¶
func (layer *MaxpoolLayer) Forward()
func (*MaxpoolLayer) Initialize ¶
func (layer *MaxpoolLayer) Initialize(init Initializer)
func (*MaxpoolLayer) Input ¶
func (layer *MaxpoolLayer) Input() []float64
func (*MaxpoolLayer) PreDelta ¶
func (layer *MaxpoolLayer) PreDelta() []float64
func (*MaxpoolLayer) SetDelta ¶
func (layer *MaxpoolLayer) SetDelta(rawDelta []float64)
func (*MaxpoolLayer) SetInput ¶
func (layer *MaxpoolLayer) SetInput(rawInput []float64)
func (*MaxpoolLayer) SetOptimizerInitializer ¶
func (layer *MaxpoolLayer) SetOptimizerInitializer(opt OptimizerInitializer)
func (*MaxpoolLayer) Update ¶
func (layer *MaxpoolLayer) Update(learningRate float64)
type ModeToggler ¶
type ModeToggler interface { EnableTrainMode() EnablePredictMode() }
type Network ¶
type Network struct { GlobalInitializer Initializer GlobalOptimizerInitializer OptimizerInitializer // contains filtered or unexported fields }
func (*Network) Backpropagate ¶
func (n *Network) Backpropagate()
func (*Network) CalculateGradients ¶
func (n *Network) CalculateGradients()
func (*Network) EnablePredictMode ¶
func (n *Network) EnablePredictMode()
func (*Network) EnableTrainMode ¶
func (n *Network) EnableTrainMode()
func (*Network) Initialize ¶
func (n *Network) Initialize()
type OptimizerInitializer ¶
type PersistableLayer ¶
type PreparationLayer ¶
type PreparationLayer struct {
// contains filtered or unexported fields
}
func NewPreparationLayer ¶
func NewPreparationLayer(batchSize, inDepth, inWidth int) *PreparationLayer
func (*PreparationLayer) Activation ¶
func (layer *PreparationLayer) Activation() []float64
func (*PreparationLayer) Backpropagate ¶
func (layer *PreparationLayer) Backpropagate()
func (*PreparationLayer) CalculateGradients ¶
func (layer *PreparationLayer) CalculateGradients()
func (*PreparationLayer) Delta ¶
func (layer *PreparationLayer) Delta() []float64
func (*PreparationLayer) Forward ¶
func (layer *PreparationLayer) Forward()
func (*PreparationLayer) Initialize ¶
func (layer *PreparationLayer) Initialize(init Initializer)
func (*PreparationLayer) Input ¶
func (layer *PreparationLayer) Input() []float64
func (*PreparationLayer) PreDelta ¶
func (layer *PreparationLayer) PreDelta() []float64
func (*PreparationLayer) SetDelta ¶
func (layer *PreparationLayer) SetDelta(rawDelta []float64)
func (*PreparationLayer) SetInput ¶
func (layer *PreparationLayer) SetInput(rawInput []float64)
func (*PreparationLayer) SetOptimizerInitializer ¶
func (layer *PreparationLayer) SetOptimizerInitializer(opt OptimizerInitializer)
func (*PreparationLayer) Update ¶
func (layer *PreparationLayer) Update(learningRate float64)
type SoftmaxLayer ¶
type SoftmaxLayer struct {
// contains filtered or unexported fields
}
func NewSoftmaxLayer ¶
func NewSoftmaxLayer(batchSize, fanOut int) *SoftmaxLayer
func (*SoftmaxLayer) Activation ¶
func (layer *SoftmaxLayer) Activation() []float64
func (*SoftmaxLayer) Backpropagate ¶
func (layer *SoftmaxLayer) Backpropagate()
func (*SoftmaxLayer) CalculateGradients ¶
func (layer *SoftmaxLayer) CalculateGradients()
func (*SoftmaxLayer) Delta ¶
func (layer *SoftmaxLayer) Delta() []float64
func (*SoftmaxLayer) Error ¶
func (layer *SoftmaxLayer) Error() float64
func (*SoftmaxLayer) Forward ¶
func (layer *SoftmaxLayer) Forward()
func (*SoftmaxLayer) Initialize ¶
func (layer *SoftmaxLayer) Initialize(init Initializer)
func (*SoftmaxLayer) Input ¶
func (layer *SoftmaxLayer) Input() []float64
func (*SoftmaxLayer) PreDelta ¶
func (layer *SoftmaxLayer) PreDelta() []float64
func (*SoftmaxLayer) SetDelta ¶
func (layer *SoftmaxLayer) SetDelta(delta []float64)
func (*SoftmaxLayer) SetInput ¶
func (layer *SoftmaxLayer) SetInput(input []float64)
func (*SoftmaxLayer) SetOptimizerInitializer ¶
func (layer *SoftmaxLayer) SetOptimizerInitializer(opt OptimizerInitializer)
func (*SoftmaxLayer) Update ¶
func (layer *SoftmaxLayer) Update(learningRate float64)
type UpdateFunc ¶
type UpdateFunc func(learningRate float64)
func (UpdateFunc) Update ¶
func (uf UpdateFunc) Update(learningRate float64)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.