TensorDictBase.mul#
- TensorDictBase.mul_(other: TensorCollection | Tensor) Self#
Multiplies every leaf by
otherin place and returnsself.The in-place version of
mul(), called bytd *= other. It has nodefault: a tensordictothermust have every key of the tensordict, and its other keys are ignored.- Parameters:
other (TensorDictBase, Tensor or Number) – the multiplier, paired with the leaves as in
mul().
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.