我正在尝试使用谷歌对象检测API来重新训练预先训练好的网络spring documentation。
但我面临以下错误:主要错误返回
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
我无法确定此错误与哪个相关。我使用的是ubuntu 18,python 3.6。我将感谢您的帮助和评论。 我在这里附上了完整的日志:
INFO:tensorflow:Caught OutOfRangeError. Stopping Training. FIFOQueue '_6_prefetch_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: prefetch_queue_Dequeue = QueueDequeueV2[component_types=[DT_STRING, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, ..., DT_INT32, DT_INT32, DT_INT32, DT_STRING, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](prefetch_queue)]]
Caused by op 'prefetch_queue_Dequeue', defined at:
File "/home/tree/MEGAsync/PyProj_right/TransferFineTuneLAB/tensorflow_toy_detector/train.py", line 206, in <module>
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "/home/tree/MEGAsync/PyProj_right/TransferFineTuneLAB/tensorflow_toy_detector/train.py", line 202, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/home/tree/models/research/object_detection/trainer.py", line 285, in train
clones = model_deploy.create_clones(deploy_config, model_fn, [input_queue])
File "/home/tree/models/research/slim/deployment/model_deploy.py", line 193, in create_clones
outputs = model_fn(*args, **kwargs)
File "/home/tree/models/research/object_detection/trainer.py", line 177, in _create_losses
train_config.use_multiclass_scores)
File "/home/tree/models/research/object_detection/trainer.py", line 122, in get_inputs
read_data_list = input_queue.dequeue()
File "/home/tree/models/research/object_detection/core/batcher.py", line 111, in dequeue
batched_tensors = self._queue.dequeue()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/data_flow_ops.py", line 440, in dequeue
self._queue_ref, self._dtypes, name=name)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 3734, in queue_dequeue_v2
timeout_ms=timeout_ms, name=name)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 1718, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
OutOfRangeError (see above for traceback): FIFOQueue '_6_prefetch_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: prefetch_queue_Dequeue = QueueDequeueV2[component_types=[DT_STRING, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, ..., DT_INT32, DT_INT32, DT_INT32, DT_STRING, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](prefetch_queue)]]
INFO:tensorflow:Finished training! Saving model to disk.
Traceback (most recent call last):
File "/home/tree/MEGAsync/PyProj_right/TransferFineTuneLAB/tensorflow_toy_detector/train.py", line 206, in <module>
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "/home/tree/MEGAsync/PyProj_right/TransferFineTuneLAB/tensorflow_toy_detector/train.py", line 202, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/home/tree/models/research/object_detection/trainer.py", line 410, in train
saver=saver)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/slim/python/slim/learning.py", line 784, in train
ignore_live_threads=ignore_live_threads)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/supervisor.py", line 828, in stop
ignore_live_threads=ignore_live_threads)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "/home/tree/.local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/queue_runner_impl.py", line 252, in _run
enqueue_callable()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1244, in _single_operation_run
self._call_tf_sessionrun(None, {}, [], target_list, None)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.NotFoundError: /home/tree/MEGAsync/PyProj_right/TransferFineTuneLAB/tensorflow_toy_detector/tfdata.tfrecord; No such file or directory
[[Node: parallel_read/ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/device:CPU:0"](parallel_read/TFRecordReaderV2, parallel_read/filenames)]]
答案 0 :(得分:0)
我解决了这个问题。它只是与滥用数据协议有关。主数据协议是可可,但我试图提供错误的数据集。 因此错误是因为它无法读取任何数据。