Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was 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

@mohannahoveyda

Description

@mohannahoveyda

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions