尝试从 github 运行 python 2 代码时出现奇怪的错误

时间:2021-05-12 22:25:19

标签: python python-2.7 tensorflow

我正在尝试运行 CIHP_PGN github 存储库,以便从我下载的数据集中解析一些图像。

我尝试按照他们提供的步骤操作,并根据他们在自述页面中的指示创建了排列数据集文件夹。

因此在修复多个数据集相关错误后,当我尝试在 google colab 上运行 train_pgn.py 文件时出现此错误:

[!] Load failed...
W0512 21:12:47.343019 140552207587200 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; No such file or directory
; 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)
  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)
tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_1_create_inputs/batch/fifo_queue' is closed and has insufficient elements (requested 1, current size 0)
     [[node create_inputs/batch (defined at /tensorflow-1.15.2/python2.7/tensorflow_core/python/framework/ops.py:1748) ]]

Original stack trace for u'create_inputs/batch':
  File "train_pgn.py", line 299, in <module>
    main()
  File "train_pgn.py", line 52, in main
    image_batch, label_batch, edge_batch = reader.dequeue(BATCH_SIZE)
  File "/content/drive/My Drive/abc/CIHP_PGN/utils/image_reader_pgn.py", line 236, in dequeue
    image_batch, label_batch, edge_batch = tf.train.batch([self.image, self.label, self.edge], num_elements)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/util/deprecation.py", line 324, in new_func
    return func(*args, **kwargs)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/training/input.py", line 1020, in batch
    name=name)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/training/input.py", line 789, in _batch
    dequeued = queue.dequeue_many(batch_size, name=name)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/ops/data_flow_ops.py", line 489, in dequeue_many
    self._queue_ref, n=n, component_types=self._dtypes, name=name)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/ops/gen_data_flow_ops.py", line 3862, in queue_dequeue_many_v2
    timeout_ms=timeout_ms, name=name)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
    op_def=op_def)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/framework/ops.py", line 3357, in create_op
    attrs, op_def, compute_device)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
    op_def=op_def)
  File "/tensorflow-1.15.2/python2.7/tensorflow_core/python/framework/ops.py", line 1748, in __init__
    self._traceback = tf_stack.extract_stack()

0 个答案:

没有答案