Skip to content

Commit

Permalink
Fix IBP for ATenHeaviside (issue #62)
Browse files Browse the repository at this point in the history
  • Loading branch information
shizhouxing committed Dec 8, 2023
1 parent d129670 commit 2553832
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions auto_LiRPA/operators/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def forward(self, *x):
# x[0]: input; x[1]: value when x == 0
return torch.heaviside(x[0], x[1])

def interval_propagate(self, *v):
assert not self.is_input_perturbed(1)
return self.forward(v[0][0], v[1][0]), self.forward(v[0][1], v[1][0])

def _init_opt_parameters_impl(self, size_spec, name_start):
"""Implementation of init_opt_parameters for each start_node."""
l = self.inputs[0].lower
Expand Down

0 comments on commit 2553832

Please sign in to comment.