Table of Contents

Class OnnxTensorInfo

Namespace
AiDotNet.Onnx
Assembly
AiDotNet.dll

Information about an ONNX tensor (input or output).

public class OnnxTensorInfo : IOnnxTensorInfo
Inheritance
OnnxTensorInfo
Implements
Inherited Members

Properties

ElementType

Gets the element type name (e.g., "float", "int64", "string").

public string ElementType { get; init; }

Property Value

string

HasDynamicShape

Gets whether this tensor has dynamic dimensions (shape contains -1).

public bool HasDynamicShape { get; }

Property Value

bool

Name

Gets the name of the tensor.

public string Name { get; init; }

Property Value

string

Shape

Gets the shape of the tensor. -1 indicates a dynamic dimension.

public int[] Shape { get; init; }

Property Value

int[]

TotalElements

Gets the total number of elements if the shape is fully known, -1 otherwise.

public long TotalElements { get; }

Property Value

long

Methods

ToString()

Creates a string representation of the tensor info.

public override string ToString()

Returns

string