nvidia.dali.fn.get_property(__input, /, *, key, bytes_per_sample_hint=[0], preserve=False, seed=-1, device=None, name=None)#

Returns a property of the tensor passed as an input.

The type of the output will depend on the key of the requested property.

Supported backends
  • ‘cpu’

  • ‘gpu’


__input (TensorList) – Input to the operator.

Keyword Arguments:
  • key (str) –

    Specifies, which property is requested.

    The following properties are supported:

    • "source_info": Returned type: byte-array.

      String-like byte array, which contains information about the origin of the sample. Fox example, fn.get_property() called on tensor loaded via fn.readers.file() returns full path of the file, from which the tensor comes from.

    • "layout": Returned type: byte-array

      Data layout in the given Tensor.

  • 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.

  • seed (int, optional, default = -1) –

    Random seed.

    If not provided, it will be populated based on the global seed of the pipeline.