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

Class PerIterShapeSource

dali/test/python/test_external_source_parallel.py:1120–1127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1118
1119
1120class PerIterShapeSource:
1121 def __init__(self, shapes):
1122 self.shapes = shapes
1123
1124 def __call__(self, sample_info):
1125 batch_idx = sample_info.iteration
1126 shape = self.shapes[batch_idx % len(self.shapes)]
1127 return np.full(shape, sample_info.idx_in_epoch, dtype=np.uint8)
1128
1129
1130def per_iter_shape_pipeline(

Callers 1

pipelineFunction · 0.85

Calls

no outgoing calls

Tested by 1

pipelineFunction · 0.68