nonzero

dragon.vm.torch.nonzero(
  input,
  out=None
)[source]

Return the index of non-zero elements.

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

dragon.vm.torch.Tensor – The output tensor.