LukeOLuck commited on
Commit
2462e43
1 Parent(s): 083997e

Update forward

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -8,7 +8,7 @@ class AutoModelForSentenceEmbedding(nn.Module):
8
 
9
  self.model = model
10
 
11
- def forward(self, **kwargs)
12
  model_output = self.model(**kwargs)
13
  embeddings = self.mean_pooling(model_output, kwargs['attention_mask'])
14
  embeddings = torch.nn.functional.normalize(embeddings, p=2, dim=1)
 
8
 
9
  self.model = model
10
 
11
+ def forward(self, **kwargs):
12
  model_output = self.model(**kwargs)
13
  embeddings = self.mean_pooling(model_output, kwargs['attention_mask'])
14
  embeddings = torch.nn.functional.normalize(embeddings, p=2, dim=1)