You can always leverage the fact that nan != nan : >>> x = torch.tensor([1, 2, np.nan]) tensor([ 1., 2., nan.]) >>> x != x tensor([ 0, 0, ...
確定! 回上一頁