Show / Hide Table of Contents

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
ValueType.Equals(Object)
ValueType.GetHashCode()
ValueType.ToString()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public struct OrtTensorTypeAndShapeInfo

Properties

| Improve this Doc View Source

DimensionsCount

Fetches shape dimension count (rank) for the tensor.

Declaration
public readonly int DimensionsCount { get; }
Property Value
Type Description
Int32

dim count

| Improve this Doc View Source

ElementCount

Fetches tensor element count based on the shape information.

Declaration
public long ElementCount { readonly get; }
Property Value
Type Description
Int64

number of typed tensor elements

| Improve this Doc View Source

ElementDataType

Fetches tensor element data type

Declaration
public TensorElementType ElementDataType { readonly get; }
Property Value
Type Description
TensorElementType

enum value for the data type

| Improve this Doc View Source

IsString

Returns true if this data element is a string

Declaration
public readonly bool IsString { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Shape

Tensor dimensions.

Declaration
public long[] Shape { readonly get; }
Property Value
Type Description
Int64[]

array of dims

  • Improve this Doc
  • View Source
In This Article
Back to top