Runs multiple learning epochs using Batcher objects. More...
Inherits NetLearnerBase.
Public Member Functions | |
publicapi | NetLearner (Trainable *net, int Ntrain, float *trainData, int *trainLabels, int Ntest, float *testData, int *testLabels, int batchSize) |
publicapi VIRTUAL void | reset () |
publicapi VIRTUAL bool | tickBatch () |
publicapi VIRTUAL bool | getEpochDone () |
publicapi VIRTUAL int | getNextEpoch () |
publicapi VIRTUAL int | getNextBatch () |
publicapi VIRTUAL int | getNTrain () |
publicapi VIRTUAL int | getBatchNumRight () |
publicapi VIRTUAL float | getBatchLoss () |
publicapi VIRTUAL bool | tickEpoch () |
publicapi VIRTUAL void | run () |
publicapi VIRTUAL bool | isLearningDone () |
publicapi VIRTUAL void | setLearningRate (float learningRate) |
publicapi VIRTUAL void | learn (float learningRate) |
Runs multiple learning epochs using Batcher objects.
Handles learning the neural net, ie running multiple epochs. Uses two Batchers, one for training, one for testing, to learn the epochs.
This class expects the data to be already in memory. If the data is really big, wont fit in memory, you probably want to use something more like NetLearnerOnDemand, which can load in a chunk of data from datafiles at a time
publicapi NetLearner::NetLearner | ( | Trainable * | net, |
int | Ntrain, | ||
float * | trainData, | ||
int * | trainLabels, | ||
int | Ntest, | ||
float * | testData, | ||
int * | testLabels, | ||
int | batchSize | ||
) |
publicapi VIRTUAL void NetLearner::reset | ( | ) |
publicapi VIRTUAL bool NetLearner::tickBatch | ( | ) |
publicapi VIRTUAL bool NetLearner::getEpochDone | ( | ) |
publicapi VIRTUAL int NetLearner::getNextEpoch | ( | ) |
publicapi VIRTUAL int NetLearner::getNextBatch | ( | ) |
publicapi VIRTUAL int NetLearner::getNTrain | ( | ) |
publicapi VIRTUAL int NetLearner::getBatchNumRight | ( | ) |
publicapi VIRTUAL float NetLearner::getBatchLoss | ( | ) |
publicapi VIRTUAL bool NetLearner::tickEpoch | ( | ) |
publicapi VIRTUAL void NetLearner::run | ( | ) |
publicapi VIRTUAL bool NetLearner::isLearningDone | ( | ) |
publicapi VIRTUAL void NetLearner::setLearningRate | ( | float | learningRate | ) |
publicapi VIRTUAL void NetLearner::learn | ( | float | learningRate | ) |