Hi Huggingface team,
I would love to contribute translating DPR to TFDPR model .
This is my first time trying to contribute so please bear with me for my simple question.
I have followed @sshleifer 's great PR on TFBart model on 4 files : __init__.py  , convert_pytorch_checkpoint_to_tf2.py , utils/dummy_tf_objects.py and (newly created) modeling_tf_dpr.py
Now the TF code can run properly with examples in Pytorch’s DPR (correct input/output tensors) . However, it seems the method .from_pretrained(..., from_pt=True) does not work properly as there are always warning messages that weights could not be loaded :
Some weights of the PyTorch model were not used when initializing the TF 2.0 model TFDPRContextEncoder: ['ctx_encoder.bert_model.encoder.layer.7.intermediate.dense.bias', 'ctx_encoder.bert_model.encoder.layer.7.attention.output.dense.weight', ... (long list of every variable)]

I have a colab code for the modified 4 mentioned files here : https://colab.research.google.com/drive/1lU4fx7zkr-Y3CXa3wmHIY8yJhKdiN3DI?usp=sharing
(It would be great if Sam or Patrick @patrickvonplaten can take a quick look, as this may be an easy fix)
(to easily navigate the change, please “find on page” for e.g. TFDPRContextEncoder )