See if we can avoid some model / layer pickle issues with the aa attr in ConvNormAct

more_opt_stuff
Ross Wightman 2024-12-02 16:55:29 -08:00 committed by Ross Wightman
parent 5fe5f9d488
commit 464885e135
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ class ConvNormAct(nn.Module):
def forward(self, x): def forward(self, x):
x = self.conv(x) x = self.conv(x)
x = self.bn(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) x = self.aa(x)
return x return x