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

运行predict_bert.py时报错TypeError: add_weight() got multiple values for argument 'name'怎么解决呀 #14

Open
Phoenix-Qiu opened this issue Sep 24, 2020 · 1 comment

Comments

@Phoenix-Qiu
Copy link

Traceback (most recent call last):
File "/home/customer/qlf/code/Chinese-clinical-NER/bert_bilstm_crf/predict_bert.py", line 19, in
model=Bert_ner(config_path,checkpoint_path,dict_path).model_build_bert_crf()
File "/home/customer/qlf/code/Chinese-clinical-NER/bert_bilstm_crf/bert_ner.py", line 54, in model_build_bert_crf
output = crf(x)
File "/home/customer/anaconda3/envs/qlf_dl/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 926, in call
input_list)
File "/home/customer/anaconda3/envs/qlf_dl/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1098, in _functional_construction_call
self._maybe_build(inputs)
File "/home/customer/anaconda3/envs/qlf_dl/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 2643, in _maybe_build
self.build(input_shapes) # pylint:disable=not-callable
File "/home/customer/qlf/code/Chinese-clinical-NER/bert_bilstm_crf/crf_layer.py", line 203, in build
constraint=self.kernel_constraint)
TypeError: add_weight() got multiple values for argument 'name'

Process finished with exit code 1
(来自代码小白的抓狂)
求大佬们帮忙解决啊~~~

@dec26th
Copy link

dec26th commented Mar 26, 2021

+1 碰到这个问题,这个估计和库的版本有关,可能得问一下博主了

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