Tensor.scalar constructor
Tensor.scalar(
- double value
Creates a scalar tensor (shape = 1).
Implementation
factory Tensor.scalar(double value) {
return Tensor(Float32List.fromList([value]), [1]);
}
Creates a scalar tensor (shape = 1).
factory Tensor.scalar(double value) {
return Tensor(Float32List.fromList([value]), [1]);
}