Skip to content

ImportError: cannot import name 'PreTrainedBertModel' from 'pytorch_pretrained_bert.modeling' #2

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

Closed
llyiue opened this issue Mar 23, 2019 · 2 comments

Comments

@llyiue
Copy link

llyiue commented Mar 23, 2019

在modeling中找不到PreTrainedBertModel??

@llyiue llyiue changed the title ImportError: cannot import name 'PreTrainedBertModel' from 'pytorch_pretrained_bert.modeling' (/root/userfolder/anaconda3/envs/pytorch/lib/python3.7/site-packages/pytorch_pretrained_bert/modeling.py) ImportError: cannot import name 'PreTrainedBertModel' from 'pytorch_pretrained_bert.modeling' Mar 23, 2019
@ghost
Copy link

ghost commented Mar 23, 2019

Try changing it to BertPreTrainedModel.

@lonePatient
Copy link
Owner

lonePatient commented Mar 24, 2019

@llyiue for the new pytorch-pretrained-bert package . use from pytorch_pretrained_bert.modeling import BertPreTrainedModel

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

2 participants