Shape - version 1#

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

  • Domain: ai.onnx

  • Since version: 1

Takes a tensor as input and outputs an 1D int64 tensor containing the shape of the input tensor.

Inputs

  • data (T): An input tensor.

Outputs

  • shape (T1): Shape of the input tensor

Type Constraints

  • T: Input tensor can be of arbitrary type. 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).

  • T1: Constrain output to int64 tensor. Allowed types: tensor(int64).