DeepCL  SNAPSHOT
Deep convolutional neural networks using OpenCL
Public Member Functions | List of all members
Batcher Class Referenceabstract

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...
 

Detailed Description

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

Public API

Constructor & Destructor Documentation

publicapi Batcher::Batcher ( Trainable *  net,
int  batchSize,
int  N,
float *  data,
int const *  labels 
)

constructor: pass in data to process, along with labels, network, ...

Public API

Member Function Documentation

publicapi void Batcher::reset ( )

reset to the first batch, and set epochDone to false

Public API
publicapi int Batcher::getNextBatch ( )

what is the index of the next batch to process?

Public API
publicapi VIRTUAL float Batcher::getLoss ( )
virtual

for training/testing, what is error loss so far?

Public API
publicapi VIRTUAL int Batcher::getNumRight ( )
virtual

for training/testing, how many right so far?

Public API
publicapi VIRTUAL int Batcher::getN ( )
virtual

how many examples in the entire set of currently loaded data?

Public API
publicapi VIRTUAL bool Batcher::getEpochDone ( )
virtual

has this epoch finished?

Public API
publicapi bool Batcher::tick ( int  epoch)

processes one single batch of data

Public API

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

Public API
publicapi EpochResult Batcher::run ( int  epoch)

runs batch once, for currently loaded data

Public API

could be one batch of learning, or one batch of forward propagation (for test/prediction), for example

Public API

The documentation for this class was generated from the following files: