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

Function get_data

examples/GAN/Image2Image.py:169–179  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

167
168
169def get_data(args):
170 datadir = args.data
171 imgs = glob.glob(os.path.join(datadir, '*.jpg'))
172 ds = ImageFromFile(imgs, channel=3, shuffle=True)
173
174 ds = MapData(ds, functools.partial(split_input, args.mode))
175 augs = [imgaug.Resize(286), imgaug.RandomCrop(256)]
176 ds = AugmentImageComponents(ds, augs, (0, 1))
177 ds = BatchData(ds, BATCH)
178 ds = MultiProcessRunner(ds, 100, 1)
179 return ds
180
181
182def sample(datadir, model_path):

Callers 1

Image2Image.pyFile · 0.70

Calls 6

ImageFromFileClass · 0.85
MapDataClass · 0.85
BatchDataClass · 0.85
MultiProcessRunnerClass · 0.85
joinMethod · 0.80

Tested by

no test coverage detected