Skip to content

Commit

Permalink
Further revert clamp changes (broke tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpratz committed Nov 21, 2024
1 parent 433226b commit 7906c1e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class AffineTransform(Transform):
def __init__(self, clamp: bool = True, **kwargs):
super().__init__(**kwargs)
self.clamp = clamp
self.clamp_factor = 3.0

@property
def params_per_dim(self):
Expand All @@ -29,7 +30,7 @@ def constrain_parameters(self, parameters: dict[str, Tensor]) -> dict[str, Tenso

# soft clamp
if self.clamp:
scale = ops.arcsinh(scale)
scale = self.clamp_factor * ops.arcsinh(scale)

parameters["scale"] = scale
return parameters
Expand Down

0 comments on commit 7906c1e

Please sign in to comment.