FlatTensor constructor
FlatTensor({
- Iterable<
Int64> ? shape, - FlatTensorDataInt8? int8Tensor,
- FlatTensorDataUInt8? uint8Tensor,
- FlatTensorDataInt16? int16Tensor,
- FlatTensorDataUInt16? uint16Tensor,
- FlatTensorDataInt32? int32Tensor,
- FlatTensorDataUInt32? uint32Tensor,
- FlatTensorDataInt64? int64Tensor,
- FlatTensorDataUInt64? uint64Tensor,
- FlatTensorDataFloat? floatTensor,
- FlatTensorDataDouble? doubleTensor,
Implementation
factory FlatTensor({
$core.Iterable<$fixnum.Int64>? shape,
FlatTensorDataInt8? int8Tensor,
FlatTensorDataUInt8? uint8Tensor,
FlatTensorDataInt16? int16Tensor,
FlatTensorDataUInt16? uint16Tensor,
FlatTensorDataInt32? int32Tensor,
FlatTensorDataUInt32? uint32Tensor,
FlatTensorDataInt64? int64Tensor,
FlatTensorDataUInt64? uint64Tensor,
FlatTensorDataFloat? floatTensor,
FlatTensorDataDouble? doubleTensor,
}) {
final $result = create();
if (shape != null) {
$result.shape.addAll(shape);
}
if (int8Tensor != null) {
$result.int8Tensor = int8Tensor;
}
if (uint8Tensor != null) {
$result.uint8Tensor = uint8Tensor;
}
if (int16Tensor != null) {
$result.int16Tensor = int16Tensor;
}
if (uint16Tensor != null) {
$result.uint16Tensor = uint16Tensor;
}
if (int32Tensor != null) {
$result.int32Tensor = int32Tensor;
}
if (uint32Tensor != null) {
$result.uint32Tensor = uint32Tensor;
}
if (int64Tensor != null) {
$result.int64Tensor = int64Tensor;
}
if (uint64Tensor != null) {
$result.uint64Tensor = uint64Tensor;
}
if (floatTensor != null) {
$result.floatTensor = floatTensor;
}
if (doubleTensor != null) {
$result.doubleTensor = doubleTensor;
}
return $result;
}