nonzero¶
dragon.
nonzero
(
inputs,
**kwargs
)[source]¶Return the index of non-zero elements.
\[\text{out} = \{i\}, \text{ if } \text{input}_{i} \neq 0 \]- Parameters:
- inputs (dragon.Tensor) – The input tensor.
- Returns:
dragon.Tensor – The output tensor.