OnnxTensor class

Helper class for managing ONNX tensor memory.

Constructors

OnnxTensor.fromInputIds(List<int> inputIds)
Creates a tensor for BERT-style input IDs.
factory
OnnxTensor.fromList(List<double> values, List<int> shape)
Creates a tensor from a list of floats.
factory

Properties

data Pointer<Float>
final
elementCount int
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape List<int>
final

Methods

dispose() → void
Frees the native memory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toList() List<double>
Extracts data as a list of doubles.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited