From e06a94f0df3c19ecd23024162b3697bd1e12c8a9 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 14 Sep 2022 00:53:52 +0200 Subject: Fix convnext --- text_recognizer/networks/convnext/convnext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/text_recognizer/networks/convnext/convnext.py b/text_recognizer/networks/convnext/convnext.py index 68de81a..308c009 100644 --- a/text_recognizer/networks/convnext/convnext.py +++ b/text_recognizer/networks/convnext/convnext.py @@ -1,8 +1,8 @@ from typing import Optional, Sequence -from text_recognizer.networks.convnext.attention import TransformerBlock -from torch import nn, Tensor +from torch import Tensor, nn +from text_recognizer.networks.convnext.attention import TransformerBlock from text_recognizer.networks.convnext.downsample import Downsample from text_recognizer.networks.convnext.norm import LayerNorm @@ -70,5 +70,5 @@ class ConvNext(nn.Module): for fn in blocks: x = fn(x) x = down(x) - x = self.attn(x) + x = self.attn(x) if self.attn is not None else x return self.norm(x) -- cgit v1.2.3-70-g09d2