MCPcopy Create free account
hub / github.com/NVIDIA/DALI / get_data

Function get_data

dali/test/python/reader/test_caffe.py:120–128  ·  view source on GitHub ↗
(shard_id, num_shards, stick_to_shard)

Source from the content-addressed store, hash-verified

118 return images
119
120 def get_data(shard_id, num_shards, stick_to_shard):
121 p = pipeline(shard_id, num_shards, stick_to_shard)
122 size = p.reader_meta()["Reader"]["epoch_size_padded"]
123
124 # This should return some unique number for each sample
125 def sample_id(sample):
126 return sample.as_array().sum()
127
128 return {sample_id(p.run()[0]) for _ in range(size)}
129
130 dataset = get_data(0, 1, False)
131

Callers 2

test_caffe_shardingFunction · 0.70
pipelineFunction · 0.50

Calls 4

sample_idFunction · 0.85
reader_metaMethod · 0.80
pipelineFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected