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 int DimensionsCount { get; }
Property Value
Type Description
int

dim count

| Improve this Doc View Source

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

| Improve this Doc View Source

ElementDataType

Fetches tensor element data type

Declaration
public readonly TensorElementType ElementDataType { 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 bool IsString { get; }
Property Value
Type Description
bool
| Improve this Doc View Source

Shape

Tensor dimensions.

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

array of dims

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