# nvidia.dali.fn.multi_paste¶

nvidia.dali.fn.multi_paste(*inputs, **kwargs)

Performs multiple pastes from image batch to each of outputs

This operator can also change the type of data.

Supported backends
• ‘cpu’

• ‘gpu’

Parameters

images (3D TensorList) –

Batch of input images.

Assumes HWC layout.

Keyword Arguments
• in_ids (int or list of int or TensorList of int) – Indices of the inputs to paste data from.

• output_size (int or list of int or TensorList of int) – Shape of the output.

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

• dtype (nvidia.dali.types.DALIDataType, optional, default = DALIDataType.NO_TYPE) – Output data type. If not set, the input type is used.

• in_anchors (int or TensorList of int, optional) –

Absolute coordinates of LU corner of the source region.

The anchors are represented as 2D tensors where the first dimension corresponds to the elements of in_ids and the second one is equal to the number of dimensions of the data, excluding channels.

If not provided, all anchors are zero.

• out_anchors (int or TensorList of int, optional) –

Absolute coordinates of LU corner of the destination region.

The anchors are represented as 2D tensors where the first dimension corresponds to the elements of in_ids and the second one is equal to the number of dimensions of the data, excluding channels.

If not provided, all anchors are zero.

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

• shapes (int or TensorList of int, optional) –

Shape of the paste regions.

The shapes are represented as 2D tensors where the first dimension corresponds to the elements of in_ids and the second one is equal to the number of dimensions of the data, excluding channels.

If not provided, the shape is calculated so that the region goes from the region anchor

in the input image until the end of the input image.