On this page
torch.Tensor.add
Tensor.add(other, *, alpha=1) → Tensor-
Add a scalar or tensor to
selftensor. If bothalphaandotherare specified, each element ofotheris scaled byalphabefore being used.When
otheris a tensor, the shape ofothermust be broadcastable with the shape of the underlying tensorSee
torch.add()
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.Tensor.add.html