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

AttributeError: module 'tensorflow.contrib.estimator' has no attribute 'stop_if_no_decrease_hook' #1

Open
Biaocsu opened this issue Aug 8, 2019 · 3 comments

Comments

@Biaocsu
Copy link

Biaocsu commented Aug 8, 2019

你好,我用tensorflow版本为1.14.0,运行你的代码出现
Traceback (most recent call last):
File "bert_ner_api.py", line 47, in
train_api()
File "bert_ner_api.py", line 21, in train_api
train(args)
File "/home/desktop/KG/NER-Chinese/bert_ner/bert_ner/bert_base/train/bert_lstm_ner.py", line 677, in train
early_stopping_hook = tf.contrib.estimator.stop_if_no_decrease_hook(
AttributeError: module 'tensorflow.contrib.estimator' has no attribute 'stop_if_no_decrease_hook'
麻烦帮解决一下

@EOA-AILab
Copy link
Owner

@Biaocsu 你好!你的这个问题是由于tensorflow的新版本所引起的。tensorflow-gpu 1.14.0版本通过import tensorflow.estimator.experimental.stop_if_no_decrease_hook进行调用。建议尝试换成tensorflow-gpu 1.13.1版本。

@Biaocsu
Copy link
Author

Biaocsu commented Aug 22, 2019

@EOA-AILab 嗯嗯,多谢。期待你bert模型速度优化结果

@whao1011
Copy link

whao1011 commented Dec 1, 2019

tensorflow -gpu 1.14.0版本通过import tensorflow.estimator.experimental.stop_if_no_decrease_hook进行尝试。建议尝试换成tensorflow-gpu 1.13.1版本。@ Biaocsu你好!你的这个问题是由于tensorflow的新版本所引起的。

@ EOA-AILab你好!我换成了tf 1.13.1的版本怎么tf.estimator却报红找不到了

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

3 participants