summaryrefslogtreecommitdiff
path: root/src/text_recognizer
diff options
context:
space:
mode:
authoraktersnurra <gustaf.rydholm@gmail.com>2020-08-20 22:56:29 +0200
committeraktersnurra <gustaf.rydholm@gmail.com>2020-08-20 22:56:29 +0200
commitfe23001b6588e6e6e9e2c5a99b72f3445cf5206f (patch)
treea12dffe669ee2b53bc3be2058b3adfaae03ea611 /src/text_recognizer
parent1f459ba19422593de325983040e176f97cf4ffc0 (diff)
Minor bug fix.
Diffstat (limited to 'src/text_recognizer')
-rw-r--r--src/text_recognizer/models/base.py4
-rw-r--r--src/text_recognizer/networks/line_lstm_ctc.py1
-rw-r--r--src/text_recognizer/weights/CharacterModel_EmnistDataset_ResidualNetwork_weights.ptbin28654593 -> 4562821 bytes
3 files changed, 3 insertions, 2 deletions
diff --git a/src/text_recognizer/models/base.py b/src/text_recognizer/models/base.py
index 74fd223..3a84a11 100644
--- a/src/text_recognizer/models/base.py
+++ b/src/text_recognizer/models/base.py
@@ -139,10 +139,10 @@ class Model(ABC):
else:
_optimizer = None
- if self._optimizer and lr_scheduler is not None:
+ if _optimizer and lr_scheduler is not None:
if "OneCycleLR" in str(lr_scheduler):
lr_scheduler_args["steps_per_epoch"] = len(self._data_loaders["train"])
- _lr_scheduler = lr_scheduler(self._optimizer, **lr_scheduler_args)
+ _lr_scheduler = lr_scheduler(_optimizer, **lr_scheduler_args)
else:
_lr_scheduler = None
diff --git a/src/text_recognizer/networks/line_lstm_ctc.py b/src/text_recognizer/networks/line_lstm_ctc.py
index d704139..2e2c3a5 100644
--- a/src/text_recognizer/networks/line_lstm_ctc.py
+++ b/src/text_recognizer/networks/line_lstm_ctc.py
@@ -2,3 +2,4 @@
import torch
from torch import nn
+from torch import Tensor
diff --git a/src/text_recognizer/weights/CharacterModel_EmnistDataset_ResidualNetwork_weights.pt b/src/text_recognizer/weights/CharacterModel_EmnistDataset_ResidualNetwork_weights.pt
index 008beb2..a5c6aaf 100644
--- a/src/text_recognizer/weights/CharacterModel_EmnistDataset_ResidualNetwork_weights.pt
+++ b/src/text_recognizer/weights/CharacterModel_EmnistDataset_ResidualNetwork_weights.pt
Binary files differ