bound_multiplicative

bound_multiplicative(param: Tensor, pos: Tensor, neg: Tensor, max: float | None, min: float | None, **kwargs) Tensor[source]

Computes the scaled update of multiplicative parameter dependence.

This is sometimes also referred to as “soft parameter dependence” and is equivalent to power dependence with an exponent of 1.

\[U = (P_\text{max} - P) U_+ - (P - P_\text{min}) U_-\]
Parameters:
  • param (torch.Tensor) – parameter with update bounding, \(P\).

  • pos (torch.Tensor) – potentiative update being applied, \(U_+\).

  • neg (torch.Tensor) – depressive update being applied, \(U_-\).

  • max (float | None) – value of the upper bound, \(P_\text{max}\).

  • min (float | None) – value of the lower bound, \(P_\text{min}\).

Returns:

bounded update.

Return type:

torch.Tensor