A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pytorch.org/docs/stable/generated/torch.sub.html below:

torch.sub — PyTorch 2.8 documentation

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=inputialpha×otheri

Supports broadcasting to a common shape, type promotion, and integer, float, and complex inputs.

Parameters
Keyword Arguments

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