Open ghost opened 4 years ago
please use tf version >= 1.13 or 1.14
1.13 or 1.14 TensorFlow -- 1.15.0 Traceback (most recent call last): File "/usr/local/bin/bert-base-ner-train", line 8, in
sys.exit(train_ner()) File "/usr/local/lib/python3.6/dist-packages/bert_base/runs/init.py", line 38, in train_ner train(args=args) File "/usr/local/lib/python3.6/dist-packages/bert_base/train/bert_lstm_ner.py", line 618, 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'
1.13 or 1.14 TensorFlow -- 1.15.0 Traceback (most recent call last): File "/usr/local/bin/bert-base-ner-train", line 8, in sys.exit(train_ner()) File "/usr/local/lib/python3.6/dist-packages/bert_base/runs/init.py", line 38, in train_ner train(args=args) File "/usr/local/lib/python3.6/dist-packages/bert_base/train/bert_lstm_ner.py", line 618, 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'
- early_stopping_hook = tf.estimator.experimental.stop_if_no_decrease_hook(
+ early_stopping_hook = tf.contrib.estimator.stop_if_no_decrease_hook(
early_stopping_hook = tf.contrib.estimator.stop_if_no_decrease_hook( estimator=estimator, metric_name='loss', max_steps_without_decrease=num_train_steps, eval_dir=None, min_steps=0, run_every_secs=None, run_every_steps=args.save_checkpoints_steps) AttributeError: module 'tensorflow.contrib.estimator' has no attribute 'stop_if_no_decrease_hook' early_stopping_hook = tf.estimator.experimental.stop_if_no_decrease_hook( estimator=estimator, metric_name='loss', max_steps_without_decrease=num_train_steps, eval_dir=None, min_steps=0, run_every_secs=None, run_every_steps=args.save_checkpoints_steps) AttributeError: module 'tensorflow.estimator' has no attribute 'experimental' tf.version = '1.9.0'