Struct OrtTensorTypeAndShapeInfo
This struct represents type and shape information for a tensor. It may describe a tensor type that is a model input or output or an information that can be extracted from a tensor in OrtValue.
Inherited Members
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public struct OrtTensorTypeAndShapeInfo
Properties
| Improve this Doc View SourceDimensionsCount
Fetches shape dimension count (rank) for the tensor.
Declaration
public int DimensionsCount { get; }
Property Value
| Type | Description |
|---|---|
| int | dim count |
ElementCount
Fetches tensor element count based on the shape information.
Declaration
public readonly long ElementCount { get; }
Property Value
| Type | Description |
|---|---|
| long | number of typed tensor elements |
ElementDataType
Fetches tensor element data type
Declaration
public readonly TensorElementType ElementDataType { get; }
Property Value
| Type | Description |
|---|---|
| TensorElementType | enum value for the data type |
IsString
Returns true if this data element is a string
Declaration
public bool IsString { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Shape
Tensor dimensions.
Declaration
public readonly long[] Shape { get; }
Property Value
| Type | Description |
|---|---|
| long[] | array of dims |