Function zeros_like

Source
pub fn zeros_like(x: &Tensor) -> Tensor
Expand description

Creates a Tensor filled with zeros, with the same shape, data type and device as another Tensor.

§Arguments

  • x - The reference to the Tensor to mimic the shape, data type and device.

§Returns

A Tensor filled with zeros, with the same shape, data type and device as x.