From 2553832b5a5bbfe643b694458867ebd1dbdece65 Mon Sep 17 00:00:00 2001 From: Zhouxing Shi Date: Fri, 8 Dec 2023 13:33:05 -0800 Subject: [PATCH] Fix IBP for ATenHeaviside (issue #62) --- auto_LiRPA/operators/activations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/auto_LiRPA/operators/activations.py b/auto_LiRPA/operators/activations.py index 27d9fe4..7d9db6c 100644 --- a/auto_LiRPA/operators/activations.py +++ b/auto_LiRPA/operators/activations.py @@ -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