Documentation
¶
Index ¶
- Constants
- func ConvertMat64(m mat.Matrix) [][]float32
- func ConvertMatrix(m [][]float32) *mat.Dense
- func Im2Col(img [][][]float32, kernelSize, stride int) [][]float32
- type BaseLayer
- type ConvolutionLayer
- type DropoutLayer
- type FullconnectLayer
- type LRN
- type Layer
- type PoolingLayer
- type ReLULayer
- type SoftmaxLossLayer
Constants ¶
View Source
const ( Data = "Data" Convolution = "Convolution" InnerProduct = "InnerProduct" Pooling = "Pooling" ReLU = "ReLU" Dropout = "Dropout" SoftmaxWithLoss = "SoftmaxWithLoss" Softmax = "Softmax" Lrn = "Lrn" )
Variables ¶
This section is empty.
Functions ¶
func ConvertMat64 ¶
ConvertMat64 converts mat64 matrix to [][]float32
func ConvertMatrix ¶
ConvertMatrix converts slice of vector to mat64.Matrix
Types ¶
type BaseLayer ¶
BaseLayer is base struct of Layers.
type ConvolutionLayer ¶
type ConvolutionLayer struct { *BaseLayer NInput uint32 NOutput uint32 KernelSize int Stride int Padding int Weights [][][][]float32 Bias []float32 BiasTerm bool }
ConvolutionLayer is layer of Convolution.
func NewConvolutionLayer ¶
func NewConvolutionLayer(name, t string, nInput, nOutput uint32, kernelSize, stride, padding int, biasTerm bool) *ConvolutionLayer
NewConvolutionLayer is constructor.
type DropoutLayer ¶
DropoutLayer is layer of Dropout.
func NewDropoutLayer ¶
func NewDropoutLayer(name, t string, ratio float32) *DropoutLayer
NewDropoutLayer is constructor.
type FullconnectLayer ¶
type FullconnectLayer struct { *BaseLayer Width int Height int Weights [][]float32 BiasTerm bool Bias []float32 }
FullconnectLayer is a layer.
func NewFullconnectLayer ¶
func NewFullconnectLayer(name, t string, width, height int, biasTerm bool) *FullconnectLayer
NewFullconnectLayer is constructor.
type Layer ¶
type Layer interface { GetName() string GetType() string Forward([][][]float32) ([][][]float32, error) }
Layer is object of network layer.
type PoolingLayer ¶
PoolingLayer is layer of Pooling.
func NewPoolingLayer ¶
func NewPoolingLayer(name, t string, kernelSize, stride, padding int) *PoolingLayer
NewPoolingLayer is constructor.
type SoftmaxLossLayer ¶
type SoftmaxLossLayer struct {
*BaseLayer
}
SoftmaxLossLayer is layer of Softmax loss.
func NewSoftmaxLossLayer ¶
func NewSoftmaxLossLayer(name, t string) *SoftmaxLossLayer
NewSoftmaxLossLayer is constructor.
Click to show internal directories.
Click to hide internal directories.