Rate this Page
★ ★ ★ ★ ★

TensorDictBase.addcdiv#

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

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

The in-place version of addcdiv().

Parameters:
Keyword Arguments:

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

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