You can make a boolean mask and then call nonzero() : (arr == 0).nonzero(). For instance: arr = torch.randint(high=2, size=(3, 3))
確定! 回上一頁