Skip to content
Snippets Groups Projects

Add start_token parameter to prediction function

Merged Mélodie Boillet requested to merge start-token-predict into main
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
+ 4
1
@@ -92,6 +92,7 @@ class DAN:
input_sizes,
confidences=False,
attentions=False,
start_token=None,
):
"""
Run prediction on an input image.
@@ -102,7 +103,9 @@ class DAN:
"""
input_tensor = input_tensor.to(self.device)
start_token = len(self.charset) + 1
start_token = (
self.charset.index(start_token) if start_token else len(self.charset) + 1
)
end_token = len(self.charset)
# Run the prediction.
Loading