Squeeze - version 1#

This page documents version 1 of operator Squeeze. See Squeeze for the latest version (since version 25).

  • Domain: ai.onnx

  • Since version: 1

Remove single-dimensional entries from the shape of a tensor. Takes a parameter axes with a list of axes to squeeze. If axes is not provided, all the single dimensions will be removed from the shape. If an axis is selected with shape entry not equal to one, an error is raised.

Inputs

  • data (T): Tensors with at least max(dims) dimensions.

Outputs

  • squeezed (T): Reshaped tensor with same data as input.

Attributes

  • axes (int[]): List of non-negative integers, indicate the dimensions to squeeze.

Type Constraints

  • T: Constrain input and output types to all tensor types. Allowed types: tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8).