Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

ValueError in faiss_indexer.py Due to Mismatched Tensor Shapes During ELQ Training #132

Open
mohannahoveyda opened this issue Nov 3, 2023 · 0 comments

Comments

@mohannahoveyda
Copy link

Hi all,

While trying to train the ELQ model on WebQSP according to this guide, I encounter ValueError: too many values to unpack (expected 2) from the line below in the faiss_indexer.py script:
scores, indexes = self.index.search(query_vectors, top_k)

The problem is the search function expects a 2d tensor of shape (n,1024) for query_vectors, whereas in elq/biencoder/train_biencoder.py the tensor fed to faiss_index.search_knn(embedding_ctxt, 10) is a 4d tensor of shape (64, 50, 50, 1024).

How should this be handled?

FAISS version: 1.7.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant