DeepCL
SNAPSHOT
Deep convolutional neural networks using OpenCL
|
Runs an epoch for a single set of already-loaded data. More...
Inherited by ForwardBatcher, LearnBatcher, and NetActionBatcher.
Public Member Functions | |
publicapi | Batcher (Trainable *net, int batchSize, int N, float *data, int const *labels) |
constructor: pass in data to process, along with labels, network, ... More... | |
publicapi void | reset () |
reset to the first batch, and set epochDone to false More... | |
publicapi int | getNextBatch () |
what is the index of the next batch to process? More... | |
virtual publicapi float | getLoss () |
for training/testing, what is error loss so far? More... | |
virtual publicapi int | getNumRight () |
for training/testing, how many right so far? More... | |
virtual publicapi int | getN () |
how many examples in the entire set of currently loaded data? More... | |
virtual publicapi bool | getEpochDone () |
has this epoch finished? More... | |
publicapi bool | tick (int epoch) |
processes one single batch of data More... | |
publicapi EpochResult | run (int epoch) |
runs batch once, for currently loaded data More... | |
Runs an epoch for a single set of already-loaded data.
This class is responsible for running all batches once (ie one 'epoch'), but for a single set of already-loaded data If you want to have a class that loads the data in chunks, then you'll need OnDemandBatcher Note however that, what OnDemandBatcher does is, it loads in some data, and then it calls this Batcher class. so they work together
publicapi Batcher::Batcher | ( | Trainable * | net, |
int | batchSize, | ||
int | N, | ||
float * | data, | ||
int const * | labels | ||
) |
constructor: pass in data to process, along with labels, network, ...
publicapi void Batcher::reset | ( | ) |
reset to the first batch, and set epochDone to false
publicapi int Batcher::getNextBatch | ( | ) |
what is the index of the next batch to process?
|
virtual |
for training/testing, what is error loss so far?
|
virtual |
for training/testing, how many right so far?
|
virtual |
how many examples in the entire set of currently loaded data?
|
virtual |
has this epoch finished?
publicapi bool Batcher::tick | ( | int | epoch | ) |
processes one single batch of data
could be learning for one batch, or prediction/testing for one batch
if most recent epoch has finished, then resets, and starts a new set of learning
publicapi EpochResult Batcher::run | ( | int | epoch | ) |
runs batch once, for currently loaded data
could be one batch of learning, or one batch of forward propagation (for test/prediction), for example