Category: Condition operation
Short description: NonZero returns the indices of the non-zero elements of the input tensor.
Detailed description: NonZero returns the indices of the non-zero elements of the input tensor (in row-major order - by dimension). The output tensor has shape [rank(input), num_non_zero]
. For example, for the tensor [[1, 0], [1, 1]]
the output will be [[0, 1, 1], [0, 0, 1]]
.
Attributes
Inputs:
data
tensor of arbitrary rank of type T. Required.Outputs:
[rank(data), num_non_zero]
of type T_IND.Types
int64
or int32
.Example