- ngraph.opset3.squeeze(data: Union[_pyngraph.Node, int, float, numpy.ndarray], axes: Union[_pyngraph.Node, int, float, numpy.ndarray], name: Optional[str] = None) _pyngraph.Node ¶
Perform squeeze operation on input tensor.
data – The node with data tensor.
axes – List of non-negative integers, indicate the dimensions to squeeze. One of: input node or array.
name – Optional new name for output node.
The new node performing a squeeze operation on input tensor.
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: tensor with shape [1, 2, 1, 3, 1, 1], axes=[2, 4]
Result: tensor with shape [1, 2, 3, 1]