Open kbwzy opened 5 years ago
You have to change the call tf.contrib.estimator.stop_if_no_increase_hook
to tf.estimator.experimental.stop_if_no_increase_hook
.
For example, in /models/lstm_crf/main.py, im the line 171, change:
hook = tf.contrib.estimator.stop_if_no_increase_hook(
estimator, 'f1', 500, min_steps=8000, run_every_secs=120)
to:
hook = tf.estimator.experimental.stop_if_no_increase_hook(
estimator, 'f1', 500, min_steps=8000, run_every_secs=120)
This worked for me for tensorflow==1.15.0
Traceback (most recent call last): File "main.py", line 171, in
hook = tf.contrib.estimator.stop_if_no_increase_hook(
AttributeError: module 'tensorflow.contrib.estimator' has no attribute 'stop_if_no_increase_hook'