mxnet
Classes | Namespaces | Macros | Typedefs
io.h File Reference

mxnet io data structure and data iterator More...

#include <vector>
#include <string>
#include <utility>
#include <queue>
#include "dmlc/data.h"
#include "dmlc/registry.h"
#include "./base.h"
#include "./ndarray.h"
Include dependency graph for io.h:

Go to the source code of this file.

Classes

class  mxnet::IIterator< DType >
 iterator type More...
 
struct  mxnet::DataInst
 a single data instance More...
 
struct  mxnet::DataBatch
 DataBatch of NDArray, returned by Iterator. More...
 
struct  mxnet::DataIteratorReg
 Registry entry for DataIterator factory functions. More...
 
class  mxnet::Dataset
 A random accessable dataset which provides GetLen() and GetItem(). Unlike DataIter, it's a static lookup storage which is friendly to random access. The dataset itself should NOT contain data processing, which should be applied during data augmentation or transformation processes. More...
 
struct  mxnet::DatasetReg
 Registry entry for Dataset factory functions. More...
 
class  mxnet::BatchifyFunction
 
struct  mxnet::BatchifyFunctionReg
 Registry entry for DataSampler factory functions. More...
 

Namespaces

 mxnet
 namespace of mxnet
 

Macros

#define MXNET_REGISTER_IO_ITER(name)   DMLC_REGISTRY_REGISTER(::mxnet::DataIteratorReg, DataIteratorReg, name)
 Macro to register Iterators. More...
 
#define MXNET_REGISTER_IO_DATASET(name)   DMLC_REGISTRY_REGISTER(::mxnet::DatasetReg, DatasetReg, name)
 Macro to register Datasets. More...
 
#define MXNET_REGISTER_IO_BATCHIFY_FUNCTION(name)   DMLC_REGISTRY_REGISTER(::mxnet::BatchifyFunctionReg, BatchifyFunctionReg, name)
 Macro to register Batchify Functions. More...
 

Typedefs

typedef std::function< IIterator< DataBatch > *()> mxnet::DataIteratorFactory
 typedef the factory function of data iterator More...
 
typedef std::function< Dataset *(const std::vector< std::pair< std::string, std::string > > &)> mxnet::DatasetFactory
 typedef the factory function of dataset More...
 
using mxnet::BatchifyFunctionPtr = std::shared_ptr< BatchifyFunction >
 
typedef std::function< BatchifyFunction *(const std::vector< std::pair< std::string, std::string > > &)> mxnet::BatchifyFunctionFactory
 typedef the factory function of data sampler More...
 

Detailed Description

mxnet io data structure and data iterator

Macro Definition Documentation

◆ MXNET_REGISTER_IO_BATCHIFY_FUNCTION

#define MXNET_REGISTER_IO_BATCHIFY_FUNCTION (   name)    DMLC_REGISTRY_REGISTER(::mxnet::BatchifyFunctionReg, BatchifyFunctionReg, name)

Macro to register Batchify Functions.

// example of registering a Batchify Function
.describe("Stack Batchify Function")
.set_body([]() {
return new StackBatchify();
});

◆ MXNET_REGISTER_IO_DATASET

#define MXNET_REGISTER_IO_DATASET (   name)    DMLC_REGISTRY_REGISTER(::mxnet::DatasetReg, DatasetReg, name)

Macro to register Datasets.

// example of registering an image sequence dataset
REGISTER_IO_ITE(ImageSequenceDataset)
.describe("image sequence dataset")
.set_body([]() {
return new ImageSequenceDataset();
});

◆ MXNET_REGISTER_IO_ITER

#define MXNET_REGISTER_IO_ITER (   name)    DMLC_REGISTRY_REGISTER(::mxnet::DataIteratorReg, DataIteratorReg, name)

Macro to register Iterators.

// example of registering a mnist iterator
REGISTER_IO_ITER(MNISTIter)
.describe("Mnist data iterator")
.set_body([]() {
return new PrefetcherIter(new MNISTIter());
});
MXNET_REGISTER_IO_BATCHIFY_FUNCTION
#define MXNET_REGISTER_IO_BATCHIFY_FUNCTION(name)
Macro to register Batchify Functions.
Definition: io.h:201