summaryrefslogtreecommitdiff
path: root/text_recognizer/network/transformer
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-15 21:47:54 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-15 21:47:54 +0200
commit9ce21f569ecac03f15f2ad669fde3dd4a512f8cc (patch)
treee6f5bbf4cfe758788fd6ad3679b714d4ecfad568 /text_recognizer/network/transformer
parenta93dcc5b9c8160a441c5b5f99f2f59264778ef91 (diff)
Format
Diffstat (limited to 'text_recognizer/network/transformer')
-rw-r--r--text_recognizer/network/transformer/embedding/l2_norm.py2
-rw-r--r--text_recognizer/network/transformer/embedding/rotary.py2
-rw-r--r--text_recognizer/network/transformer/embedding/token.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/text_recognizer/network/transformer/embedding/l2_norm.py b/text_recognizer/network/transformer/embedding/l2_norm.py
index 0e48bca..f5ec4ba 100644
--- a/text_recognizer/network/transformer/embedding/l2_norm.py
+++ b/text_recognizer/network/transformer/embedding/l2_norm.py
@@ -1,5 +1,5 @@
-from einops import rearrange
import torch.nn.functional as F
+from einops import rearrange
from torch import Tensor
diff --git a/text_recognizer/network/transformer/embedding/rotary.py b/text_recognizer/network/transformer/embedding/rotary.py
index 2254f81..7e88264 100644
--- a/text_recognizer/network/transformer/embedding/rotary.py
+++ b/text_recognizer/network/transformer/embedding/rotary.py
@@ -1,6 +1,6 @@
import torch
-from torch import nn, einsum
from einops import rearrange
+from torch import einsum, nn
class RotaryEmbedding(nn.Module):
diff --git a/text_recognizer/network/transformer/embedding/token.py b/text_recognizer/network/transformer/embedding/token.py
index 838f514..bf5149e 100644
--- a/text_recognizer/network/transformer/embedding/token.py
+++ b/text_recognizer/network/transformer/embedding/token.py
@@ -1,4 +1,4 @@
-from torch import nn, Tensor
+from torch import Tensor, nn
from .l2_norm import l2_norm