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

Method _prep_input_sets

dali/python/nvidia/dali/_debug_mode.py:573–593  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

571 raise_err("ndim", actual_ndim, expected_ndim)
572
573 def _prep_input_sets(self, inputs):
574 inputs = list(inputs)
575
576 for i, input in enumerate(inputs):
577 # Transforming any convertible datatype to
578 # TensorList (DataNodeDebugs are already unpacked).
579 # Additionally accepting input sets, but only as list of TensorList.
580 if not isinstance(input, (_tensors.TensorListCPU, _tensors.TensorListGPU)) and not (
581 isinstance(input, list)
582 and all(
583 [
584 isinstance(elem, (_tensors.TensorListCPU, _tensors.TensorListGPU))
585 for elem in input
586 ]
587 )
588 ):
589 inputs[i] = _transform_data_to_tensorlist(
590 input, len(input), device_id=self._device_id
591 )
592
593 return _build_input_sets(inputs, self._op_name)
594
595 def _update_classification(self, old_collection, position, new_classification):
596 """Keeps the data classification up to date in case of running the conditional mode or

Callers 1

runMethod · 0.95

Calls 2

_build_input_setsFunction · 0.90

Tested by

no test coverage detected