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

Function unfold_batch

dali/test/python/sequences_test_utils.py:199–205  ·  view source on GitHub ↗
(batch, num_expand)

Source from the content-addressed store, hash-verified

197
198
199def unfold_batch(batch, num_expand):
200 assert num_expand >= 0
201 if num_expand == 0:
202 return batch
203 if num_expand > 1:
204 batch = [sample.reshape((-1,) + sample.shape[num_expand:]) for sample in batch]
205 return [frame for sample in batch for frame in sample]
206
207
208def unfold_batches(batches, num_expand):

Callers 2

unfold_outputMethod · 0.85
unfold_batchesFunction · 0.85

Calls 1

reshapeMethod · 0.45

Tested by

no test coverage detected