Tensor.zeros constructor

Tensor.zeros(
  1. List<int> shape
)

Creates a tensor filled with zeros.

Implementation

factory Tensor.zeros(List<int> shape) {
  final size = _productOfShape(shape);
  return Tensor(Float32List(size), List<int>.from(shape));
}