Caffe
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
caffe::DataReader Class Reference

Reads data from a source to queues available to data layers. A single reading thread is created per source, even if multiple solvers are running in parallel, e.g. for multi-GPU training. This makes sure databases are read sequentially, and that each solver accesses a different subset of the database. Data is distributed to solvers in a round-robin way to keep parallel training deterministic. More...

#include <data_reader.hpp>

Classes

class  Body
 
class  QueuePair
 

Public Member Functions

 DataReader (const LayerParameter &param)
 
BlockingQueue< Datum * > & free () const
 
BlockingQueue< Datum * > & full () const
 

Protected Member Functions

 DISABLE_COPY_AND_ASSIGN (DataReader)
 

Static Protected Member Functions

static string source_key (const LayerParameter &param)
 

Protected Attributes

const shared_ptr< QueuePairqueue_pair_
 
shared_ptr< Bodybody_
 

Static Protected Attributes

static map< const string, boost::weak_ptr< DataReader::Body > > bodies_
 

Detailed Description

Reads data from a source to queues available to data layers. A single reading thread is created per source, even if multiple solvers are running in parallel, e.g. for multi-GPU training. This makes sure databases are read sequentially, and that each solver accesses a different subset of the database. Data is distributed to solvers in a round-robin way to keep parallel training deterministic.


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