Show / Hide Table of Contents

Class NodeMetadata

Resembles type and shape information of session-graph nodes, used for communicating the shape/type of input/output nodes

Inheritance
Object
NodeMetadata
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class NodeMetadata

Properties

| Improve this Doc View Source

Dimensions

Tensor shape valid only if this is a Tensor. Preserved for API compatibility

Declaration
public int[] Dimensions { get; }
Property Value
Type Description
Int32[]

Array of dimensions

| Improve this Doc View Source

ElementDataType

Tensor Element Type. Valid if tensor

Declaration
public TensorElementType ElementDataType { get; }
Property Value
Type Description
TensorElementType
| Improve this Doc View Source

ElementType

.NET type that corresponds to the primitive Tensor data type. Valid only if this is a Tensor.

Declaration
public Type ElementType { get; }
Property Value
Type Description
Type

System.Type

| Improve this Doc View Source

IsString

Convenience method to check for string

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

IsTensor

Whether it is a Tensor

Declaration
public bool IsTensor { get; }
Property Value
Type Description
Boolean

currently always returns true

| Improve this Doc View Source

OnnxValueType

Type value of the node

Declaration
public OnnxValueType OnnxValueType { get; }
Property Value
Type Description
OnnxValueType

A value of OnnxValueType enum

| Improve this Doc View Source

SymbolicDimensions

Symbolic dimensions valid only if this is a Tensor. Preserved for API compatibility

Declaration
public string[] SymbolicDimensions { get; }
Property Value
Type Description
String[]

Array of symbolic dimensions if present.

Methods

| Improve this Doc View Source

AsMapMetadata()

Retrieves MapMetadata, valid only if this node represents a Map.

Declaration
public MapMetadata AsMapMetadata()
Returns
Type Description
MapMetadata
Exceptions
Type Condition
System.InvalidOperationException

when the instance does not contain map metadata

| Improve this Doc View Source

AsOptionalMetadata()

Retrieves Optional type metadata, valid if this node is optional Optional metadata is nothing more than just a container for all the usual element types.

Declaration
public OptionalMetadata AsOptionalMetadata()
Returns
Type Description
OptionalMetadata
Exceptions
Type Condition
System.InvalidOperationException
| Improve this Doc View Source

AsSequenceMetadata()

Retrieves SequenceMetadata, valid only if this node represents a Sequence

Declaration
public SequenceMetadata AsSequenceMetadata()
Returns
Type Description
SequenceMetadata
Exceptions
Type Condition
System.InvalidOperationException

when the instance does not contain sequence metadata

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