luyug / COIL

NAACL2021 - COIL Contextualized Lexical Retriever
Apache License 2.0
148 stars 28 forks source link

add unicoil reproduce #3

Closed MXueguang closed 3 years ago

luyug commented 3 years ago

A few comments on the code,

  1. Relu argument: let's make it more expressive, something like token_rep_relu.
  2. Use torch.relu (or torch.nn.functional.relu) instead of torch.nn.ReLU() for conciseness. Meanwhile, my understanding is that torch.relu will directly go to the cpp binding.
  3. Maybe apply relu in encode function as well for consistency?

I will also go check the documents and comment here if I have questions.