我是TensorFlow的新手,每次训练模型时,都会以错误结束:
RuntimeError: Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany
有人有解决的想法吗?
我在Ubuntu 18.04上使用Python3.6和TensorFlow 1.12.0版本,并使用ssd_mobilenet_v1_fpn_shared_box_predictor
作为模型。为了训练它,我使用了legacy/train.py
脚本。
我尝试查看GitHub问题,但我了解不多。
该错误来自:/home/ant/.local/lib/python3.6/site-packages/tensorflow/python/training/coordinator.py
在TensorFlow保存检查点之后
INFO:tensorflow:Stopping Training.
I0412 11:09:09.962124 139983862277952 tf_logging.py:115] Stopping Training.
INFO:tensorflow:Finished training! Saving model to disk.
I0412 11:09:09.962288 139983862277952 tf_logging.py:115] Finished training! Saving model to disk.
Traceback (most recent call last):
File "object_detection/train.py", line 184, in <module>
tf.app.run()
File "/home/ant/.local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/ant/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 306, in new_func
return func(*args, **kwargs)
File "object_detection/train.py", line 180, in main
graph_hook_fn=graph_rewriter_fn)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/legacy/trainer.py", line 415, in train
saver=saver)
File "/home/ant/.local/lib/python3.6/site-packages/tensorflow/contrib/slim/python/slim/learning.py", line 785, in train
ignore_live_threads=ignore_live_threads)
File "/home/ant/.local/lib/python3.6/site-packages/tensorflow/python/training/supervisor.py", line 832, in stop
ignore_live_threads=ignore_live_threads)
File "/home/ant/.local/lib/python3.6/site-packages/tensorflow/python/training/coordinator.py", line 397, in join
" ".join(stragglers))
RuntimeError: Coordinator stopped with threads still running: QueueRunnerThread-dummy_queue-sync_token_q_EnqueueMany
答案 0 :(得分:0)
我有同样的问题,我的tf版本是1.13,然后我升级到了版本1.14,也有同样的错误。
最后,我将ignore_liver_threads=False
和ignore_liver_threads=True
的{{1}}都更改为../tensorflow/contrib/slim/python/slim/learning.py
。