Skip to content

Commit

Permalink
Fixed CLM numerical instability
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaAyGar committed Jun 6, 2024
1 parent 1527b2b commit 7fc0908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlordinal/layers/clm.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _clm(self, projected: torch.Tensor, thresholds: torch.Tensor):
0,
1,
)
z3 = a - b
z3 = torch.clip(a - b, -10, 10)

if self.link_function == "probit":
a3T = self.dist.cdf(z3)
Expand Down

0 comments on commit 7fc0908

Please sign in to comment.