zeros

dragon.zeros(
  shape,
  dtype='float32',
  **kwargs
)[source]

Return a tensor filled with zeros.

\[\text{out} \leftarrow 0 \]
x = dragon.zeros(shape=(2, 3), dtype='float32')
Parameters:
  • shape (Sequence[Union[int, dragon.Tensor]]) The tensor shape.
  • dtype (str, optional, default='float32') The optional data type.
Returns:

dragon.Tensor The output tensor.