torch.Tensor.count\_nonzero =========================== .. currentmodule:: torch .. automethod:: Tensor.count_nonzero