nvidia.dali.fn.cast_like#
- nvidia.dali.fn.cast_like(
- input_0,
- input_1,
- /,
- *,
- device=None,
- name=None,
- bytes_per_sample_hint=[0],
- preserve=False,
Cast the first tensor to the type of the second tensor.
This operator allows sequence inputs and supports volumetric data.
- Supported backends
‘cpu’
‘gpu’
- Parameters:
- Keyword Arguments:
bytes_per_sample_hint¶ (int or list of int, optional, default = [0]) –
Output size hint, in bytes per sample.
If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.
preserve¶ (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.