10 #include <dmlc/registry.h>
23 template<
typename DType>
30 virtual void Init(
const std::vector<std::pair<std::string, std::string> >& kwargs) = 0;
34 virtual bool Next(
void) = 0;
36 virtual const DType &
Value(
void)
const = 0;
77 :
public dmlc::FunctionRegEntryBase<DataIteratorReg,
78 DataIteratorFactory> {
95 #define MXNET_REGISTER_IO_ITER(name) \
96 DMLC_REGISTRY_REGISTER(::mxnet::DataIteratorReg, DataIteratorReg, name)
std::vector< std::string > data_names
store the name of each data, it could be used for making NDArrays
Definition: io.h:40
void SetDataName(const std::string data_name)
set data name to each attribute of data
Definition: io.h:42
std::string extra_data
extra data to be fed to the network
Definition: io.h:54
int num_batch_padd
num of example padded to batch
Definition: io.h:68
std::vector< uint64_t > index
index of image data
Definition: io.h:64
unsigned index
unique id for instance
Definition: io.h:50
virtual const DType & Value(void) const =0
get current data
std::string extra_data
extra data to be fed to the network
Definition: io.h:66
NDArray interface that handles array arithematics.
iterator type
Definition: io.h:24
Registry entry for DataIterator factory functions.
Definition: io.h:76
virtual void Init(const std::vector< std::pair< std::string, std::string > > &kwargs)=0
set the parameters and init iter
virtual ~IIterator(void)
constructor
Definition: io.h:38
virtual bool Next(void)=0
move to next item
DataBatch of NDArray, returned by Iterator.
Definition: io.h:60
a single data instance
Definition: io.h:48
std::vector< TBlob > data
content of data
Definition: io.h:52
virtual void BeforeFirst(void)=0
reset the iterator
configuation of mxnet as well as basic data structure.
std::vector< NDArray > data
content of dense data, if this DataBatch is dense
Definition: io.h:62
std::function< IIterator< DataBatch > *()> DataIteratorFactory
typedef the factory function of data iterator
Definition: io.h:72