From 8728fc193af64de1eb70c0b24b1c3e80d97073dc Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 7 Nov 2021 23:48:15 +0100 Subject: Add dropout to final layer in efficientnet --- text_recognizer/networks/encoders/efficientnet/efficientnet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/text_recognizer/networks/encoders/efficientnet/efficientnet.py b/text_recognizer/networks/encoders/efficientnet/efficientnet.py index 7023297..32934d5 100644 --- a/text_recognizer/networks/encoders/efficientnet/efficientnet.py +++ b/text_recognizer/networks/encoders/efficientnet/efficientnet.py @@ -101,6 +101,7 @@ class EfficientNet(nn.Module): momentum=self.bn_momentum, eps=self.bn_eps, ), + nn.Dropout(p=self.arch[-1]), ) def extract_features(self, x: Tensor) -> Tensor: -- cgit v1.2.3-70-g09d2