Skip to content

Commit

Permalink
white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gpucce committed Jul 31, 2023
1 parent 0dfb922 commit 5e6716b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/open_clip/coca_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ def encode_text(self, text, normalize=True, embed_cls=True):
def forward(self, image, text=None, embed_cls=True, image_latent=None, image_embs=None):
if image_latent is None or image_embs is None:
image_latent, image_embs = self._encode_image(image)

if text is None:
return {"image_features": image_latent, "image_embs": image_embs}

text_latent, token_embs = self._encode_text(text, embed_cls=embed_cls)

# TODO: add assertion to avoid bugs?
Expand Down

0 comments on commit 5e6716b

Please sign in to comment.