Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raytrun committed Nov 25, 2024
1 parent 1125bad commit ca5634f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llm2clip/eva_clip/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ def set_grad_checkpointing(self, enable=True):

def forward(self, text, return_all_features: bool=False, l2_norm: bool=True):
if l2_norm:
x = torch.nn.functional.normalize(text, p=2, dim=-1)
x = self.text_adaptor(x)
text = torch.nn.functional.normalize(text, p=2, dim=-1)
x = self.text_adaptor(text)
return x


Expand Down

0 comments on commit ca5634f

Please sign in to comment.