summaryrefslogtreecommitdiff
path: root/text_recognizer/networks/transformer
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/networks/transformer')
-rw-r--r--text_recognizer/networks/transformer/positional_encodings/__init__.py6
-rw-r--r--text_recognizer/networks/transformer/positional_encodings/rotary_embedding.py1
2 files changed, 5 insertions, 2 deletions
diff --git a/text_recognizer/networks/transformer/positional_encodings/__init__.py b/text_recognizer/networks/transformer/positional_encodings/__init__.py
index 91278ee..2ed8a12 100644
--- a/text_recognizer/networks/transformer/positional_encodings/__init__.py
+++ b/text_recognizer/networks/transformer/positional_encodings/__init__.py
@@ -1,4 +1,8 @@
"""Positional encoding for transformers."""
from .absolute_embedding import AbsolutePositionalEmbedding
-from .positional_encoding import PositionalEncoding, PositionalEncoding2D
+from .positional_encoding import (
+ PositionalEncoding,
+ PositionalEncoding2D,
+ target_padding_mask,
+)
from .rotary_embedding import apply_rotary_pos_emb, RotaryEmbedding
diff --git a/text_recognizer/networks/transformer/positional_encodings/rotary_embedding.py b/text_recognizer/networks/transformer/positional_encodings/rotary_embedding.py
index 5e80572..41290b4 100644
--- a/text_recognizer/networks/transformer/positional_encodings/rotary_embedding.py
+++ b/text_recognizer/networks/transformer/positional_encodings/rotary_embedding.py
@@ -5,7 +5,6 @@ Stolen from lucidrains:
Explanation of roatary:
https://blog.eleuther.ai/rotary-embeddings/
-
"""
from typing import Tuple