Remove convert_to_tensor=True in MultiVectorEncoder, this parameter was removed

#6
by tomaarsen HF Staff - opened
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -180,8 +180,8 @@ documents = [
180
  for i in range(1, 5)
181
  ]
182
 
183
- query_embeddings = model.encode_query(queries, convert_to_tensor=True)
184
- document_embeddings = model.encode_document(documents, convert_to_tensor=True)
185
  print(f"Query 0 shape: {tuple(query_embeddings[0].shape)}")
186
  print(f"Document 0 shape: {tuple(document_embeddings[0].shape)}")
187
  # Query 0 shape: (23, 320)
 
180
  for i in range(1, 5)
181
  ]
182
 
183
+ query_embeddings = model.encode_query(queries)
184
+ document_embeddings = model.encode_document(documents)
185
  print(f"Query 0 shape: {tuple(query_embeddings[0].shape)}")
186
  print(f"Document 0 shape: {tuple(document_embeddings[0].shape)}")
187
  # Query 0 shape: (23, 320)