Tensor class final

A tensor value type.

Inheritance

Constructors

Tensor({Tensor_DataType dtype = Tensor_DataType.$default, List<int> shape = const [], List<bool> boolVal = const [], List<String> stringVal = const [], List<Uint8List> bytesVal = const [], List<double> floatVal = const [], List<double> doubleVal = const [], List<int> intVal = const [], List<int> int64Val = const [], List<int> uintVal = const [], List<BigInt> uint64Val = const [], List<Tensor> listVal = const [], Map<String, Tensor> structVal = const {}, Uint8List? tensorVal})
Tensor.fromJson(Object? j)
factory

Properties

boolVal List<bool>
Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.
final
bytesVal List<Uint8List>
STRING
final
doubleVal List<double>
DOUBLE
final
dtype Tensor_DataType
The data type of tensor.
final
floatVal List<double>
FLOAT
final
hashCode int
The hash code for this object.
no setterinherited
int64Val List<int>
INT64
final
intVal List<int>
INT_8 INT_16 INT_32
final
listVal List<Tensor>
A list of tensor values.
final
qualifiedName String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape List<int>
Shape of the tensor.
final
stringVal List<String>
STRING
final
structVal Map<String, Tensor>
A map of string to tensor.
final
tensorVal Uint8List
Serialized raw tensor content.
final
uint64Val List<BigInt>
UINT64
final
uintVal List<int>
UINT8 UINT16 UINT32
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
override
toString() String
A string representation of this object.
override

Operators

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

Constants

fullyQualifiedName → const String