alverciito commited on
Commit
0d019f1
·
1 Parent(s): 0aeae6d

zero shot experiment (fix v4)

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -262,7 +262,7 @@ class SentenceCoseNet(PreTrainedModel):
262
  Similarity scores of shape (B, S, S)
263
  """
264
  # Concatenate embeddings (B, S, 2, D)
265
- embeddings = torch.stack([embeddings_1, embeddings_2], dim=2)
266
  # Compute distances (B, S, 2, 2):
267
  embeddings = self.model.distance_layer(embeddings)
268
  # Return cosine similarities (B, S):
 
262
  Similarity scores of shape (B, S, S)
263
  """
264
  # Concatenate embeddings (B, S, 2, D)
265
+ embeddings = torch.stack([embeddings_1, embeddings_2], dim=-2)
266
  # Compute distances (B, S, 2, 2):
267
  embeddings = self.model.distance_layer(embeddings)
268
  # Return cosine similarities (B, S):