Rate this Page
★ ★ ★ ★ ★

TensorDictBase.addcmul#

TensorDictBase.addcmul_(other1, other2, *, value: float | None = 1)#

Adds value * other1 * other2 to every leaf in place and returns self.

The in-place version of addcmul().

Parameters:
Keyword Arguments:

value (Number, optional) – the multiplier for \(\text{other1} \times \text{other2}\). Defaults to 1.

Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.