Closed gui-li closed 5 years ago
I have the same question, and have you solved it?
Yes, replace that hook with the following tf.compat.v2.estimator.experimental.stop_if_no_increase_hook, it should solve this problem.
https://www.tensorflow.org/api_docs/python/tf/estimator/experimental/stop_if_no_increase_hook Here is the link to the api
ok, thx! I solved it and I find the version of tensorflow wasn't correct, so it may be wrong.
@HQH981118 So, did you upgrade your tensrflow?
Yes, I upgrade the version of tensorflow to 1.14 and use "tf.estimator.experimental.stop_if_noincrease" to replace "tf.contrib.estimator.stop_if_no_increase_hook". It works!
Thank you for your code first. When I tried to run main.py in char_lstm_lstm_crf, I got the following problem: Traceback (most recent call last): File "C:/*(Never mind)/tf_ner/models/chars_lstm_lstm_crf/main.py", line 215, in
hook = tf.contrib.estimator.stop_if_no_increase_hook(
AttributeError: module 'tensorflow.contrib.estimator' has no attribute 'stop_if_no_increase_hook'
I did run successfully before, it's so weird.