diff --git a/timm/layers/conv_bn_act.py b/timm/layers/conv_bn_act.py index 73ad670562..64edf54a3c 100644 --- a/timm/layers/conv_bn_act.py +++ b/timm/layers/conv_bn_act.py @@ -82,7 +82,8 @@ def out_channels(self): def forward(self, x): x = self.conv(x) x = self.bn(x) - if self.aa is not None: + aa = getattr(self, 'aa', None) + if aa is not None: x = self.aa(x) return x