nvidia.dali.experimental.dynamic.get_property#

nvidia.dali.experimental.dynamic.get_property(input, /, *, batch_size=None, device=None, key)#

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’

Parameters:

input (Tensor/Batch) – 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.

  • batch_size (int, optional) – The batch size to broadcast input tensors to. Ignored for batch inputs.

  • device (device-like, optional) – The device to use for the operation. Must not conflict with the device of the inputs.