LeeSureman / Flat-Lattice-Transformer

code for ACL 2020 paper: FLAT: Chinese NER Using Flat-Lattice Transformer
1k stars 178 forks source link

你好大佬,跑V1时 NameError: name '_WordBertModel' is not defined这个怎么解决?谢谢 #129

Open EJ-Cairang opened 10 months ago

EJ-Cairang commented 10 months ago

File "../fastNLP_module.py", line 362, in init self.model = _WordBertModel(model_dir_or_name=model_dir_or_name, vocab=vocab, layers=layers, NameError: name '_WordBertModel' is not defined

zhangliang-chn commented 9 months ago

如果用的是fastnlp0.5.0,直接在fastNLP_module.py中将

from fastNLP.modules.utils import _get_file_name_base_on_postfix

from fastNLP.embeddings.bert_embedding import _WordBertModel

注释符#去掉就可以了

EJ-Cairang commented 8 months ago

好的 非常感谢 再遇到 raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='212.129.155.247', port=80): Max retries exceeded with url: /embedding/bert-chinese-wwm.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9635ba14a8>: Failed to establish a new connection: [Errno 110] Connection timed out')) 这个怎么解决?

houyuchao commented 2 months ago

好的 非常感谢 再遇到 raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='212.129.155.247', port=80): Max retries exceeded with url: /embedding/bert-chinese-wwm.zip (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9635ba14a8>: Failed to establish a new connection: [Errno 110] Connection timed out')) 这个怎么解决?

您好这个问题您解决了吗