本文簡要介紹python語言中 torch.ne
的用法。
用法:
torch.ne(input, other, *, out=None) → Tensor
out(Tensor,可選的) -輸出張量。
一個布爾張量,在
input
不等於other
的情況下為 True,在其他地方為 False按元素計算 。
第二個參數可以是一個數字或張量,其形狀可與第一個參數一起廣播。
例子:
>>> torch.ne(torch.tensor([[1, 2], [3, 4]]), torch.tensor([[1, 1], [4, 4]])) tensor([[False, True], [True, False]])
參數:
關鍵字參數:
返回:
相關用法
- Python PyTorch neg用法及代碼示例
- Python PyTorch nextafter用法及代碼示例
- Python PyTorch nanquantile用法及代碼示例
- Python PyTorch nll_loss用法及代碼示例
- Python PyTorch narrow用法及代碼示例
- Python PyTorch normal_用法及代碼示例
- Python PyTorch ngrams_iterator用法及代碼示例
- Python PyTorch nansum用法及代碼示例
- Python PyTorch no_grad用法及代碼示例
- Python PyTorch norm用法及代碼示例
- Python PyTorch noop_hook用法及代碼示例
- Python PyTorch numericalize_tokens_from_iterator用法及代碼示例
- Python PyTorch normal用法及代碼示例
- Python PyTorch nanmedian用法及代碼示例
- Python PyTorch ndtri用法及代碼示例
- Python PyTorch nonzero用法及代碼示例
- Python PyTorch numel用法及代碼示例
- Python PyTorch nanmean用法及代碼示例
- Python PyTorch ndtr用法及代碼示例
- Python PyTorch nan_to_num用法及代碼示例
- Python PyTorch frexp用法及代碼示例
- Python PyTorch jvp用法及代碼示例
- Python PyTorch cholesky用法及代碼示例
- Python PyTorch vdot用法及代碼示例
- Python PyTorch ELU用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torch.ne。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。