nonzero

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

Return the indices of non-zero elements.

\[\text{out} = \{i, \text{ if } \text{input}[i] \text{ is True }\} \]
Parameters:
Returns:

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