我得到了一个OP_REQUIRES在整个文件读取失败的ops.cc:116错误,即使图像存在

2024-04-19 06:36:29 发布

您现在位置:Python中文网/ 问答频道 /正文

嗨,我有一个文件夹,里面有很多我想从中提取特征的图像。我找到了一个project on github帮助我这样做。我已经按照他们的指示安排了图像,但我发现了一个奇怪的错误:

[!] Load failed...
W0515 00:15:42.072974 140491591403392 deprecation.py:323] From train_pgn.py:239: start_queue_runners (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
.png; Input/output error
2021-05-15 00:17:43.190534: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at whole_file_read_ops.cc:116 : Unknown: ./datasets/CIHP/images/DP521D0DZ-Q11@9=person_whole_back.png; Input/output error
; No such file or directory
Traceback (most recent call last):
  File "train_pgn.py", line 299, in <module>
    main()
  File "train_pgn.py", line 249, in main
    [loss_summary, reduced_loss, loss_parsing, loss_edge, train_op], feed_dict=feed_dict)

编辑:我修复了上面显示的错误。colab一次从google drive读取大量文件时似乎有问题,但现在我又出现了另一个错误

[!] Load failed...
W0516 20:11:48.774502 139839975372672 deprecation.py:323] From test_pgn.py:169: start_queue_runners (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
.png; No such file or directory
; No such file or directory
Traceback (most recent call last):
  File "test_pgn.py", line 209, in <module>
    main()
  File "test_pgn.py", line 180, in main
    parsing_, scores, edge_, _ = sess.run([pred_all, pred_scores, pred_edge, update_op])
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/client/session.py", line 956, in run
    run_metadata_ptr)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/client/session.py", line 1180, in _run
    feed_dict_tensor, options, run_metadata)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/client/session.py", line 1359, in _do_run
    run_metadata)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/client/session.py", line 1384, in _do_call
    raise type(e)(node_def, op, message)
.png; No such file or directory
     [[node create_inputs/ReadFile_2 (defined at /tensorflow-1.15.2/python2.7/tensorflow_core/python/framework/ops.py:1748) ]]

Tags: noruninpycorepngqueuetensorflow