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

Function _verify_batch_size

dali/test/python/test_utils.py:293–300  ·  view source on GitHub ↗
(batch)

Source from the content-addressed store, hash-verified

291 batch_size = len(batch1)
292
293 def _verify_batch_size(batch):
294 if isinstance(batch, dali.backend.TensorListCPU) or isinstance(batch, list):
295 tested_batch_size = len(batch)
296 else:
297 tested_batch_size = batch.shape[0]
298 assert (
299 tested_batch_size == batch_size
300 ), "Incorrect batch size. Expected: {}, actual: {}".format(batch_size, tested_batch_size)
301
302 _verify_batch_size(batch1)
303 _verify_batch_size(batch2)

Callers 1

check_batchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected