diff options
Diffstat (limited to 'models/clip')
-rw-r--r-- | models/clip/embeddings.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/clip/embeddings.py b/models/clip/embeddings.py index 734730e..6be6e9f 100644 --- a/models/clip/embeddings.py +++ b/models/clip/embeddings.py | |||
@@ -13,7 +13,7 @@ from transformers.models.clip.modeling_clip import CLIPTextEmbeddings | |||
13 | 13 | ||
14 | 14 | ||
15 | def resize_embedding(old_embedding: nn.Embedding, new_num_embeddings: int, initializer_factor: float = 1.0) -> nn.Embedding: | 15 | def resize_embedding(old_embedding: nn.Embedding, new_num_embeddings: int, initializer_factor: float = 1.0) -> nn.Embedding: |
16 | old_num_embeddings, old_embedding_dim = old_embedding.weight.size() | 16 | old_num_embeddings, old_embedding_dim = old_embedding.weight.shape |
17 | 17 | ||
18 | if old_num_embeddings == new_num_embeddings: | 18 | if old_num_embeddings == new_num_embeddings: |
19 | return old_embedding | 19 | return old_embedding |