From 02f6266518715112f840044675095f635c8ec18b Mon Sep 17 00:00:00 2001 From: Zhouxing Shi Date: Fri, 25 Mar 2022 15:19:59 -0700 Subject: [PATCH] Fix issue #23 --- auto_LiRPA/bound_general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_LiRPA/bound_general.py b/auto_LiRPA/bound_general.py index 1e1d8c3..27ceeae 100644 --- a/auto_LiRPA/bound_general.py +++ b/auto_LiRPA/bound_general.py @@ -1179,7 +1179,7 @@ def compute_bounds(self, x=None, aux=None, C=None, method='backward', IBP=False, # check whether weights are perturbed and set nonlinear for the BoundMatMul operation for n in self._modules.values(): - if isinstance(n, (BoundLinear, BoundConv, BoundBatchNormalization)): + if type(n) in [BoundLinear, BoundConv, BoundBatchNormalization]: n.nonlinear = False for l_name in n.input_name[1:]: node = self._modules[l_name]