pytorch判斷NaN

  pytorch判斷NaN   You can always leverage the fact that nan != nan:html data = torch.tensor([1, 2, np.nan]) tensor([ 1., 2., nan.]) data[data != data] tensor([ 0, 0, 1], dtype=torch.uint8) if ci
相關文章
相關標籤/搜索