nvidia.dali.fn.squeeze

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

Removes the dimensions given as axes or axis_names.

It’s an error to remove a dimension that would cause the total volume to change.

This operator allows sequence inputs and supports volumetric data.

Supported backends
  • ‘cpu’

  • ‘gpu’

Parameters

data (TensorList) – Data to be squeezed

Keyword Arguments
  • axes (int or list of int or TensorList of int, optional, default = []) –

    Indices of dimensions which should be removed.

    All squeezed dimensions should have size 1, unless the total volume of the tensor is 0 before and after squeeze. All indices must be in the range of valid dimensions of the input

  • axis_names (layout str, optional, default = ‘’) –

    Layout columns which should be removed.

    All squeezed dimensions should have size 1, unless the total volume of the tensor is 0 before and after squeeze. All layout names should be present in data layout.

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