TensorDictBase.addcdiv#
- TensorDictBase.addcdiv(other1: TensorDictBase | Tensor, other2: TensorDictBase | Tensor, value: float | None = 1) Self#
Performs the element-wise division of
other1byother2, multiplies the result by the scalarvalueand adds it toself.\[\text{out}_i = \text{input}_i + \text{value} \times \frac{\text{other1}_i}{\text{other2}_i}\]The shapes of the elements 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 numerator tensordict (or tensor)
other2 (TensorDict or Tensor) – the denominator tensordict (or tensor)
- Keyword Arguments:
value (Number, optional) – multiplier for \(\text{other1} / \text{other2}\)
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.