nvidia.dali.fn.transforms.scale

nvidia.dali.fn.transforms.scale(*inputs, **kwargs)

Produces a scale affine transform matrix.

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

Note

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

Supported backends
  • ‘cpu’

Parameters

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

Keyword Arguments
  • scale (float or list of float or TensorList of float) –

    The scale factor, per dimension.

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

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

  • center (float or list of float or TensorList of float, optional) –

    The center of the scale operation.

    If provided, the number of elements should match the one of scale argument.

  • ndim (int, optional) –

    Number of dimensions.

    It should be provided when the number of dimensions can’t be inferred. For example, when scale is a scalar value and there’s no input transform.

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