Determine the indices of elements that are non-zero. There is a method version of this static function: Tensor.nonzero.
Indices correspond to a flattened version of the input tensor.
const t = sm.randn([100]) // equivalent calls const a = t.nonzero() const b = sm.nonzero(t)
Tensor whose values will be used to find indices
Generated using TypeDoc
Determine the indices of elements that are non-zero. There is a method version of this static function: Tensor.nonzero.
Remarks
Indices correspond to a flattened version of the input tensor.
Example
Returns