Rate this Page
★ ★ ★ ★ ★

TensorDictBase.add#

TensorDictBase.add_(other: TensorCollection | Tensor | float, *, alpha: float | None = None) → Self#

In-place version of add().

Note

In-place add does not support default keyword argument.

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