(train_or_test)
| 57 | |
| 58 | |
| 59 | def get_data(train_or_test): |
| 60 | # completely copied from imagenet-resnet.py example |
| 61 | isTrain = train_or_test == 'train' |
| 62 | |
| 63 | datadir = args.data |
| 64 | ds = dataset.ILSVRC12(datadir, train_or_test, shuffle=isTrain) |
| 65 | augmentors = fbresnet_augmentor(isTrain) |
| 66 | augmentors.append(imgaug.ToUint8()) |
| 67 | |
| 68 | ds = AugmentImageComponent(ds, augmentors, copy=False) |
| 69 | if isTrain: |
| 70 | ds = MultiProcessRunnerZMQ(ds, min(25, multiprocessing.cpu_count())) |
| 71 | ds = BatchData(ds, BATCH_SIZE, remainder=not isTrain) |
| 72 | return ds |
| 73 | |
| 74 | |
| 75 | def get_config(): |
no test coverage detected