Class TensorBase
This class is a base for all Tensors. It hosts maps with type traits.
Namespace: Microsoft.ML.OnnxRuntime.Tensors
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class TensorBase : object
Constructors
| Improve this Doc View SourceTensorBase(Type)
Constructs TensorBae
Declaration
protected TensorBase(Type primitiveType)
Parameters
Type | Name | Description |
---|---|---|
Type | primitiveType | primitive type the deriving class is using |
Methods
| Improve this Doc View SourceGetElementTypeInfo(TensorElementType)
Query TensorElementTypeInfo by enum
Declaration
public static TensorElementTypeInfo GetElementTypeInfo(TensorElementType elementType)
Parameters
Type | Name | Description |
---|---|---|
TensorElementType | elementType | type enum |
Returns
Type | Description |
---|---|
TensorElementTypeInfo | instance of TensorElementTypeInfo or null if not found |
GetTypeInfo()
Query TensorTypeInfo using this Tensor type
Declaration
public TensorTypeInfo GetTypeInfo()
Returns
Type | Description |
---|---|
TensorTypeInfo |
GetTypeInfo(Type)
Query TensorTypeInfo by one of the supported types
Declaration
public static TensorTypeInfo GetTypeInfo(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
TensorTypeInfo | TensorTypeInfo or null if not supported |