Subtracts other
, scaled by alpha
, from input
.
out i = input i − alpha × other i \text{{out}}_i = \text{{input}}_i - \text{{alpha}} \times \text{{other}}_i outi=inputi−alpha×otheri
Supports broadcasting to a common shape, type promotion, and integer, float, and complex inputs.
alpha (Number) – the multiplier for other
.
out (Tensor, optional) – the output tensor.
Example:
>>> a = torch.tensor((1, 2)) >>> b = torch.tensor((0, 1)) >>> torch.sub(a, b, alpha=2) tensor([1, 0])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4