Documentation
¶
Index ¶
- type Network
- func (n *Network) AddConvolutionLayer(filterDimensions []int, filterCount int) *Network
- func (n *Network) AddFullyConnectedLayer(outputLength int) *Network
- func (n *Network) AddMaxPoolingLayer(stride int, dimensions []int) *Network
- func (n *Network) AddReLULayer() *Network
- func (n *Network) AddSoftmaxLayer() *Network
- func (n *Network) Fit(inputs, labels, valInputs, valLabels []maths.Tensor, epochs int, batchSize int, ...)
- func (n *Network) LearningRate() float64
- func (n *Network) Predict(input maths.Tensor) []float64
- func (n *Network) PredictIndex(input maths.Tensor) int
- func (n *Network) SetLearningRate(rate float64)
- func (n *Network) Validate(inputs []maths.Tensor, labels []maths.Tensor)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func (*Network) AddConvolutionLayer ¶
func (*Network) AddFullyConnectedLayer ¶
func (*Network) AddMaxPoolingLayer ¶
func (*Network) AddReLULayer ¶
func (*Network) AddSoftmaxLayer ¶
func (*Network) Fit ¶
func (n *Network) Fit(inputs, labels, valInputs, valLabels []maths.Tensor, epochs int, batchSize int, verbose bool, logRate int, onEpochDone func())
Fit will train the CNN. inputs are the inputs, labels are the labels. epochs are the amount of times the network is fitted if valInputs and valLabels != nil a validation step is ran on that data after each epoch batchSize is the size of every propagation batch. if verbose then logging is enabled and is written to to stdout with fmt every 'logRate' of iterations a message is written when verbose == true onBatchDone is a callback that is called every time a batch is done. This can be used to reduce the learning rate for example
func (*Network) LearningRate ¶
func (*Network) PredictIndex ¶
Returns the highest index from the prediction
func (*Network) SetLearningRate ¶
Click to show internal directories.
Click to hide internal directories.