TensorDictBase.addcmul#
- TensorDictBase.addcmul(other1: TensorDictBase | Tensor, other2: TensorDictBase | Tensor, *, value: float | None = 1) Self#
Performs the element-wise multiplication of
other1byother2, multiplies the result by the scalarvalueand adds it toself.\[\text{out}_i = \text{input}_i + \text{value} \times \text{other1}_i \times \text{other2}_i\]The shapes of
self,other1, andother2must be broadcastable.For inputs of type FloatTensor or DoubleTensor,
valuemust be a real number, otherwise an integer.- Parameters:
other1 (TensorDict or Tensor) – the tensordict or tensor to be multiplied
other2 (TensorDict or Tensor) – the tensordict or tensor to be multiplied
- Keyword Arguments:
value (Number, optional) – multiplier for \(other1 .* other2\)
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.