diff --git a/models.py b/models.py index 223a03e..db6be39 100644 --- a/models.py +++ b/models.py @@ -596,9 +596,9 @@ class FouriER(torch.nn.Module): graph = degree @ graph @ degree for idx, block in enumerate(self.network): - if (isinstance(block, PoolFormerBlock)): + try: x = block(x, graph) - else: + except: x = block(x) # output only the features of last layer for image classification return x