I prepare the minibatch using ‘mx.io.DataBatch’ with an option of pad=cur_pad.
The ‘cur_pad’ is calculated by ‘batch_size - len(cur_labels)’, which is expected to handle the small size of training data (e.g. data in the last batch). However, It cannot be automatically padded to the length of batch_size.
During training, I got an IndexError of slicing stop 12 exceeds limit of 11 in the last minibatch, where the number of the data is 11 and batch_size=32.