Class NodeMetadata
Resembles type and shape information of session-graph nodes, used for communicating the shape/type of input/output nodes
Inheritance
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class NodeMetadata : object
Properties
| Improve this Doc View SourceDimensions
Tensor shape valid only if this is a Tensor. Preserved for API compatibility
Declaration
public int[] Dimensions { get; }
Property Value
Type | Description |
---|---|
System.Int32[] | Array of dimensions |
ElementDataType
Tensor Element Type. Valid if tensor
Declaration
public TensorElementType ElementDataType { get; }
Property Value
Type | Description |
---|---|
TensorElementType |
ElementType
.NET type that corresponds to the primitive Tensor data type. Valid only if this is a Tensor.
Declaration
public System.Type ElementType { get; }
Property Value
Type | Description |
---|---|
System.Type | System.Type |
IsString
Convinience method to check for string
Declaration
public bool IsString { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTensor
Whether it is a Tensor
Declaration
public bool IsTensor { get; }
Property Value
Type | Description |
---|---|
System.Boolean | currently always returns true |
OnnxValueType
Type value of the node
Declaration
public OnnxValueType OnnxValueType { get; }
Property Value
Type | Description |
---|---|
OnnxValueType | A value of OnnxValueType enum |
SymbolicDimensions
Symbolic dimensions valid only if this is a Tensor. Preserved for API compatibility
Declaration
public string[] SymbolicDimensions { get; }
Property Value
Type | Description |
---|---|
System.String[] | Array of symbolic dimensions if present. |
Methods
| Improve this Doc View SourceAsMapMetadata()
Retrieves MapMetadata, valid only if this node represents a Map.
Declaration
public MapMetadata AsMapMetadata()
Returns
Type | Description |
---|---|
MapMetadata |
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 |
AsSequenceMetadata()
Retrieves SequenceMetadata, valid only if this node represents a Sequence
Declaration
public SequenceMetadata AsSequenceMetadata()
Returns
Type | Description |
---|---|
SequenceMetadata |