Skip to content

Commit

Permalink
store some dimensions for access by dalle2
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Apr 12, 2022
1 parent 2c2d20b commit 8c6b227
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name = 'x-clip',
packages = find_packages(exclude=[]),
include_package_data = True,
version = '0.4.2',
version = '0.4.3',
license='MIT',
description = 'X-CLIP',
author = 'Phil Wang',
Expand Down
6 changes: 6 additions & 0 deletions x_clip/x_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ def __init__(
super().__init__()
assert use_all_token_embeds or (visual_has_cls_token or text_has_cls_token), 'CLS token must be included on both vision and text transformers if you are not using fine-grained contrastive learning loss'

# store some parameters for access

self.dim_text = dim_text
self.dim_image = dim_image
self.dim_latent = dim_latent

# instantiate text transformer

self.text_pad_id = text_pad_id
Expand Down

0 comments on commit 8c6b227

Please sign in to comment.