lonePatient/BERT-chinese-text-classification-pytorch

import error

zhaowujie opened this issue · 1 comments

Connected to pydev debugger (build 182.4505.26) Traceback (most recent call last): File "/media/hp208/4t/soft/pycharm-community-2018.2.4/helpers/pydev/pydevd.py", line 1664, in <module> main() File "/media/hp208/4t/soft/pycharm-community-2018.2.4/helpers/pydev/pydevd.py", line 1658, in main globals = debugger.run(setup['file'], None, None, is_module) File "/media/hp208/4t/soft/pycharm-community-2018.2.4/helpers/pydev/pydevd.py", line 1068, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/media/hp208/4t/soft/pycharm-community-2018.2.4/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/media/hp208/4t/zhaoxingjie/text/BERT-chinese-text-classification-pytorch/train_bert.py", line 16, in <module> from pybert.model.nn.bert_fine import BertFine File "/media/hp208/4t/zhaoxingjie/text/BERT-chinese-text-classification-pytorch/pybert/model/nn/bert_fine.py", line 3, in <module> from pytorch_pretrained_bert.modeling import PreTrainedBertModel, BertModel ImportError: cannot import name 'PreTrainedBertModel'
when I run train_bert.py, something wrong like this....

use BertPreTrainedModel to repalce PreTrainedBertModel is ok