bound_sharp¶
- bound_sharp(param: Tensor, pos: Tensor, neg: Tensor, max: float | None, min: float | None, **kwargs) Tensor[source]¶
Computes the scaled update of sharp parameter dependence.
This is sometimes also referred to as “hard parameter dependence”.
\[U = \Theta(P_\text{max} - P) U_+ - \Theta(P - P_\text{min}) U_-\]Where
\[\begin{split}\Theta(x) = \begin{cases} 1 &x \geq 0 \\ 0 & x < 0 \end{cases}\end{split}\]- 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: