MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / get_data

Function get_data

examples/ImageNetModels/inception-bn.py:122–131  ·  view source on GitHub ↗
(train_or_test)

Source from the content-addressed store, hash-verified

120
121
122def get_data(train_or_test):
123 isTrain = train_or_test == 'train'
124 augs = fbresnet_augmentor(isTrain)
125
126 meta = dataset.ILSVRCMeta()
127 pp_mean = meta.get_per_pixel_mean()
128 augs.append(imgaug.MapImage(lambda x: x - pp_mean[16:-16, 16:-16]))
129
130 ds = get_imagenet_dataflow(args.data, train_or_test, BATCH_SIZE, augs)
131 return ds
132
133
134def get_config():

Callers 1

get_configFunction · 0.70

Calls 4

get_per_pixel_meanMethod · 0.95
fbresnet_augmentorFunction · 0.90
get_imagenet_dataflowFunction · 0.90
appendMethod · 0.80

Tested by

no test coverage detected