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

Function _get_batch_shape

dali/python/nvidia/dali/external_source.py:41–49  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

39
40
41def _get_batch_shape(data):
42 if isinstance(data, (list, tuple, _tensors.TensorListCPU, _tensors.TensorListGPU)):
43 if len(data) == 0:
44 return [], True
45 else:
46 return [_get_shape(x) for x in data], False
47 else:
48 shape = _get_shape(data)
49 return [shape[1:]] * shape[0], True
50
51
52def _check_data_batch(data, batch_size, layout):

Callers 1

_check_data_batchFunction · 0.85

Calls 1

_get_shapeFunction · 0.85

Tested by

no test coverage detected