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

Function get_filenames

tensorpack/dataflow/dataset/cifar.py:61–73  ·  view source on GitHub ↗
(dir, cifar_classnum)

Source from the content-addressed store, hash-verified

59
60
61def get_filenames(dir, cifar_classnum):
62 assert cifar_classnum == 10 or cifar_classnum == 100
63 if cifar_classnum == 10:
64 train_files = [os.path.join(
65 dir, 'cifar-10-batches-py', 'data_batch_%d' % i) for i in range(1, 6)]
66 test_files = [os.path.join(
67 dir, 'cifar-10-batches-py', 'test_batch')]
68 meta_file = os.path.join(dir, 'cifar-10-batches-py', 'batches.meta')
69 elif cifar_classnum == 100:
70 train_files = [os.path.join(dir, 'cifar-100-python', 'train')]
71 test_files = [os.path.join(dir, 'cifar-100-python', 'test')]
72 meta_file = os.path.join(dir, 'cifar-100-python', 'meta')
73 return train_files, test_files, meta_file
74
75
76def _parse_meta(filename, cifar_classnum):

Callers 2

__init__Method · 0.85
get_per_pixel_meanMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…