NDArray interface of mxnet.
Get the dimension that corresponds to the batch size. Parameters ---------- layout : str layout string. For example, "NCHW". Returns ------- An axis indicating the batch_size dimension. When data-parallelism is used, the data will be automatically split and concatenate along the batch_size dimension. Axis can be -1, which means the whole array will be copied for each data-parallelism device.
Get DataDesc list from attribute lists. Parameters ---------- shapes : hashref with (name, shape) types : hashref with (name, type)
Default object for holding a mini-batch of data and related information.
DataIter object in mxnet.
Reset the iterator.
Returns remaining iterator items as array ref.
Get next data batch from iterator. Equivalent to self.iter_next() DataBatch(self.getdata(), self.getlabel(), self.getpad(), None) Returns ------- data : DataBatch The data of next batch.
Iterate to next batch. Returns ------- has_next : boolean Whether the move is successful.
Get data of current batch. Returns ------- data : NDArray The data of current batch.
Get data of current batch. Returns ------- label : NDArray The label of current batch.
Get index of the current batch. Returns ------- index : numpy.array The index of current batch
Get the number of padding examples in current batch. Returns ------- pad : int Number of padding examples in current batch
"Resize a DataIter to given number of batches per epoch. May produce incomplete batch in the middle of an epoch due to padding from internal iterator. Parameters ---------- data_iter : DataIter Internal data iterator. size : number of batches per epoch to resize to. reset_internal : whether to reset internal iterator on ResizeIter.reset
NDArrayIter object in mxnet. Taking NDArray or numpy array to get dataiter. Parameters ---------- data: NDArray or numpy.ndarray, a list of them, or a dict of string to them. NDArrayIter supports single or multiple data and label. label: NDArray or numpy.ndarray, a list of them, or a dict of them. Same as data, but is not fed to the model during testing. batch_size: int Batch Size shuffle: bool Whether to shuffle the data last_batch_handle: 'pad', 'discard' or 'roll_over' How to handle the last batch Note ---- This iterator will pad, discard or roll over the last batch if the size of data does not match batch_size. Roll over is intended for training and can cause problems if used for prediction.
DataIter built in MXNet. List all the needed functions here. Parameters ---------- handle : DataIterHandle the handle to the underlying C++ Data Iterator
Set the iterator to simply return always first batch. Notes ----- This can be used to test the speed of network without taking the loading delay into account.
Create an iterator. The parameters listed below can be passed in as keyword arguments. Parameters ---------- name : string, required. Name of the resulting data iterator. Returns ------- dataiter: Dataiter the resulting data iterator
To install AI::MXNet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AI::MXNet
CPAN shell
perl -MCPAN -e shell install AI::MXNet
For more information on module installation, please visit the detailed CPAN module installation guide.