Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BPTrainer ¶
type BPTrainer struct {
// contains filtered or unexported fields
}
BPTrainer trains a network given a train set and a learning configuration. It also returns debug information to monitor the process
func NewBPTrainer ¶
func NewBPTrainer(config LearningConfig, data *weight.PairSet, net weight.BPLearnerLayer, costFunction weight.BPCostFunc) *BPTrainer
NewBPTrainer creates a new BPTrainer
func (*BPTrainer) SetDebugger ¶
func (t *BPTrainer) SetDebugger(debugger debug.NetDebugger)
SetDebugger sets the debugger to use during the train process
func (*BPTrainer) SetNumGoroutines ¶
SetNumGoroutines sets the number of parallel goroutines that will train a part of each batch independently
type LearningConfig ¶
type LearningConfig struct { Method ParamUpdateMethod LearningRateStart float64 LearningRateEnd float64 Epochs int BatchSize int WeightDecay float64 Momentum float64 }
LearningConfig contains the parameters used in the learning process
type ParamUpdateMethod ¶
type ParamUpdateMethod int
ParamUpdateMethod defines the method used to update parameters in each layer
const ( //Momentum uses the momentum configuration parameter as a low-pass filter to smooth the gradient descent Momentum ParamUpdateMethod = iota //AdaDelta updates each parameter independently, without a global learning rate AdaDelta //Adam is a mix of AdaDelta + Momentum Adam )
Click to show internal directories.
Click to hide internal directories.