diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-03 00:31:00 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-03 00:31:00 +0200 |
commit | 3a21c29e2eff4378c63717f8920ca3ccbfef013c (patch) | |
tree | ba46504d7baa8d4fb5bfd473acf99a7a184b330c /text_recognizer/data/transforms.py | |
parent | 75eb34020620584247313926527019471411f6af (diff) |
Lint files
Diffstat (limited to 'text_recognizer/data/transforms.py')
-rw-r--r-- | text_recognizer/data/transforms.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/text_recognizer/data/transforms.py b/text_recognizer/data/transforms.py index 51f52de..7f3e0d1 100644 --- a/text_recognizer/data/transforms.py +++ b/text_recognizer/data/transforms.py @@ -37,6 +37,7 @@ class WordPiece: self.max_len = max_len def __call__(self, x: Tensor) -> Tensor: + """Converts Emnist target tensor to Word piece target tensor.""" y = self.mapping.emnist_to_wordpiece_indices(x) if len(y) < self.max_len: pad_len = self.max_len - len(y) |