Skip to content

Commit

Permalink
fix bug, cls token does not need pos emb
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Dec 25, 2021
1 parent 89ed952 commit f741c36
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ image_encoder = Extractor(
text_encoder = TextTransformer(
dim = 512,
num_tokens = 10000,
max_seq_len = 256 + 1,
max_seq_len = 256,
depth = 6,
heads = 8
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'x-clip',
packages = find_packages(exclude=[]),
version = '0.0.11',
version = '0.0.12',
license='MIT',
description = 'X-CLIP',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion x_clip/x_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(
self.text_transformer = TextTransformer(
dim = dim_text,
num_tokens = num_text_tokens + (1 if use_mlm else 0),
max_seq_len = text_seq_len + 1,
max_seq_len = text_seq_len,
depth = text_enc_depth,
heads = text_heads
)
Expand Down

0 comments on commit f741c36

Please sign in to comment.