zeros

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

Return a tensor filled with zeros.

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

dragon.Tensor – The output tensor.