torch.Tensor.add¶
- Tensor.add(other, *, alpha=1) Tensor ¶
將純量或 tensor 加到
self
tensor。 如果同時指定了alpha
和other
,則other
的每個元素在被使用之前會先縮放alpha
。當
other
是一個 tensor 時,other
的形狀必須與底層 tensor 的形狀 可廣播請參閱
torch.add()
將純量或 tensor 加到 self
tensor。 如果同時指定了 alpha
和 other
,則 other
的每個元素在被使用之前會先縮放 alpha
。
當 other
是一個 tensor 時,other
的形狀必須與底層 tensor 的形狀 可廣播
請參閱 torch.add()