Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key error when loading pre-trained weights #31

Open
ParnianA opened this issue Jun 10, 2021 · 4 comments
Open

Key error when loading pre-trained weights #31

ParnianA opened this issue Jun 10, 2021 · 4 comments

Comments

@ParnianA
Copy link

Hi, Thank you for your nice implementation. I get the following error when loading the pre-trained weights:

KeyError: 'Transformer/encoderblock_0\MultiHeadDotProductAttention_1/query\kernel is not a file in the archive'

Would you please help me with this?

Parnian

@bqFirst
Copy link

bqFirst commented Jun 14, 2021

Hi, Thank you for your nice implementation. I get the following error when loading the pre-trained weights:

KeyError: 'Transformer/encoderblock_0\MultiHeadDotProductAttention_1/query\kernel is not a file in the archive'

Would you please help me with this?

Parnian
I met the same problem. Have you solved it

@cantabile-kwok
Copy link

cantabile-kwok commented Dec 16, 2021

It seems to be the dir separator "\" and "/" in windows and linux. Maybe try to change query to query/ will help. In this way, your os.path will not add a "\" after the path if you are using windows.

@charchit7
Copy link

Is it resolved? Even I had this issue for one of the models.

@DanialP
Copy link

DanialP commented Nov 13, 2022

It seems to be the dir separator "" and "/" in windows and linux. Maybe try to change query to query/ will help. In this way, your os.path will not add a "" after the path if you are using windows.

This worked for me. Attaching "/" on multiple lines, where windows will add "\\" instead.

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

No branches or pull requests

5 participants