custom_functions.py 722 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
import mxnet as mx


def load_data_rec(self, batch_size):

    train_iter = mx.image.ImageIter(
        path_imgrec=self._data_dir_ + "torcs_train.rec",
        data_shape=(3, 210, 280),  # (channels, height, width)
        batch_size=batch_size,
        label_width=14,
        data_name='image',
        label_name='predictions_label'
    )
    test_iter = mx.image.ImageIter(
        path_imgrec=self._data_dir_ + "torcs_test.rec",
        data_shape=(3, 210, 280),  # (channels, height, width)
        batch_size=batch_size,
        label_width=14,
        data_name='image',
        label_name='predictions_label'
    )
    data_mean = None
    data_std = None


    return train_iter, test_iter, data_mean, data_std