nonzero

dragon.nonzero(
  inputs,
  **kwargs
)[source]

Return the index of non-zero elements.

\[\text{out} = \{i\}, \text{ if } \text{input}_{i} \neq 0 \]
Parameters:
Returns:

dragon.Tensor – The output tensor.