torch.count_nonzero. torch.count_nonzero(input, dim=None) → Tensor. Counts the number of non-zero values in the tensor input along the given dim .
確定! 回上一頁