Skip to content

Commit ca5634f

Browse files
committed
fix
1 parent 1125bad commit ca5634f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llm2clip/eva_clip/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ def set_grad_checkpointing(self, enable=True):
244244

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

251251

0 commit comments

Comments
 (0)