nvidia.dali.fn.transforms.translation#

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

Produces a translation affine transform matrix.

If another transform matrix is passed as an input, the operator applies translation to the matrix provided.

Note

The output of this operator can be fed directly to CoordTransform and WarpAffine operators.

This operator allows sequence inputs.

Supported backends
  • ‘cpu’

Parameters:

__input (TensorList, optional) – Input to the operator.

Keyword Arguments:
  • offset (float or list of float or TensorList of float) –

    The translation vector.

    The number of dimensions of the transform is inferred from this argument.

    Supports per-frame inputs.

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

  • reverse_order (bool, optional, default = False) –

    Determines the order when combining affine transforms.

    If set to False (default), the operator’s affine transform will be applied to the input transform. If set to True, the input transform will be applied to the operator’s transform.

    If there’s no input, this argument is ignored.

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

    Random seed.

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