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.
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 readonly int DimensionsCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | dim count |
ElementCount
Fetches tensor element count based on the shape information.
Declaration
public long ElementCount { readonly get; }
Property Value
Type | Description |
---|---|
System.Int64 | number of typed tensor elements |
ElementDataType
Fetches tensor element data type
Declaration
public TensorElementType ElementDataType { readonly get; }
Property Value
Type | Description |
---|---|
TensorElementType | enum value for the data type |
IsString
Returns true if this data element is a string
Declaration
public readonly bool IsString { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Shape
Tensor dimensions.
Declaration
public long[] Shape { readonly get; }
Property Value
Type | Description |
---|---|
System.Int64[] | array of dims |