zpn commited on
Commit
c8823c7
1 Parent(s): 4679577

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -2704,7 +2704,7 @@ with torch.no_grad():
2704
  model_output = model(**encoded_input)
2705
 
2706
  embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
2707
- + embeddings = F.layer_norm(embeddings, normalized_shape=embeddings.shape[1], dim=-1)
2708
  + embeddings = embeddings[:, :matryoshka_dim]
2709
  embeddings = F.normalize(embeddings, p=2, dim=1)
2710
  print(embeddings)
 
2704
  model_output = model(**encoded_input)
2705
 
2706
  embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
2707
+ + embeddings = F.layer_norm(embeddings, normalized_shape=(embeddings.shape[1],))
2708
  + embeddings = embeddings[:, :matryoshka_dim]
2709
  embeddings = F.normalize(embeddings, p=2, dim=1)
2710
  print(embeddings)