AI::MXNet::IO - NDArray interface of mxnet.
AI::MXNet::DataDesc - A container class for describing the data layout.
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.
Coverts the input to an array ref AI::MXNet::DataDesc objects. Parameters ---------- $shapes : HashRef[Shape] $types= : Maybe[HashRef[Dtype]]
AI::MXNet::DataBatch - A container for a mini-batch of the data and related information.
Default object for holding a mini-batch of data and related information.
AI::MXNet::DataIter - A parent class for MXNet data iterators.
Reset the iterator.
Returns remaining iterator items as an array ref.
Returns the next data batch from the iterator. Returns ------- $data : AI::MXNet::DataBatch The data of next batch.
Iterate to next batch. Returns ------- $has_next : Bool
The data of current batch. Returns ------- data : AI::MXNet::NDArray
The label of the current batch. Returns ------- label : AI::MXNet::NDArray
The index of the current batch. Returns ------- $index : PDL
The number of padding examples in the current batch. Returns ------- $pad : Int
AI::MXNet::ResizeIter
Resize a DataIter to a given number of batches per epoch. May produce incomplete batch in the middle of an epoch due to the 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
AI::MXNet::NDArrayIter - Predefined NDArray iterator.
Predefined NDArray iterator. Accepts PDL or AI::MXNet::NDArray object as an input. Parameters ---------- data: Maybe[AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]]. NDArrayIter supports single or multiple data and label. label: Maybe[AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]]. Same as data, but is not given to the model during testing. batch_size=1: Int Batch Size shuffle=0: Bool Whether to shuffle the data last_batch_handle='pad': '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.
AI::MXNet::MXDataIter - A data iterator pre-built in C++ layer of MXNet.
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.
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.