zeros_like

dragon.zeros_like(
  other,
  dtype='float32',
  **kwargs
)[source]

Return a tensor of zeros with shape as the other.

\[\text{out} \leftarrow 0 \]

Examples:

x = dragon.zeros(shape=(2, 3))
y = dragon.zeros_like(x)
Parameters:
  • other (dragon.Tensor) – The tensor to hint the shape.
  • dtype (str, optional, default='float32') – The optional data type.
Returns:

dragon.Tensor – The output tensor.