import mxnet as mx def get_iterators(batch_size, data_shape=(3, 224, 224)): train = mx.io.ImageRecordIter( path_imgrec = './caltech-256-60-train.rec', data_name = 'data', label_name = 'softmax_label', batch_size = batch_size, data_shape = data_shape, shuffle = True, rand_crop = True, rand_mirror = True) val = mx.io.ImageRecordIter( path_imgrec = './caltech-256-60-val.rec', data_name = 'data', label_name = 'softmax_label', batch_size = batch_size, data_shape = data_shape, rand_crop = False, rand_mirror = False) return (train, val)
Aux params are parameters of a network that are not learnt using gradient descent. Mean and variance in BatchNorm is an example.
load_checkpoint method returns the aux params separately from the other regular params. That script is just taking the aux params returned by load method and passiong it to the fit method because we want training to use weights from a pretrained model.
1 Like