albert_pytorch icon indicating copy to clipboard operation
albert_pytorch copied to clipboard

tf_path in the english model

Open Porcupine96 opened this issue 6 years ago • 1 comments

Hello,

I wanted to ask for the purpose of adding tf_path = tf_path + "/variables/variables" in the english model. There's no analogous tf_path modification in the chinese version of the script. Removing this line seems to fix my issue with converting the model.

https://github.com/lonePatient/albert_pytorch/blob/3da2ebc5d71ce44be1123344d2f629fc21ffb01b/albert_english_pytorch/model/modeling_albert.py#L50

If it's indeed a bug, I've created a PR with a fix. If not, sorry for the trouble.

Thank you :)

Porcupine96 avatar Nov 11 '19 21:11 Porcupine96

@Porcupine96 Adding tf_path = tf_path + "/variables/variables" is for converting the weight of th_hub to the weight of pytorch.

lonePatient avatar Nov 12 '19 00:11 lonePatient