summaryrefslogtreecommitdiff
path: root/src/text_recognizer/models/line_ctc_model.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/text_recognizer/models/line_ctc_model.py')
-rw-r--r--src/text_recognizer/models/line_ctc_model.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/text_recognizer/models/line_ctc_model.py b/src/text_recognizer/models/line_ctc_model.py
index af41f18..16eaed3 100644
--- a/src/text_recognizer/models/line_ctc_model.py
+++ b/src/text_recognizer/models/line_ctc_model.py
@@ -98,16 +98,12 @@ class LineCTCModel(Model):
# Put the image tensor on the device the model weights are on.
image = image.to(self.device)
- log_probs = (
- self.swa_network(image)
- if self.swa_network is not None
- else self.network(image)
- )
+ log_probs = self.forward(image)
raw_pred, _ = greedy_decoder(
predictions=log_probs,
character_mapper=self.mapper,
- blank_label=80,
+ blank_label=79,
collapse_repeated=True,
)