Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I think there are some problems in your function input_read() in main.py. #9

Open
anqier0468 opened this issue Oct 12, 2017 · 6 comments

Comments

@anqier0468
Copy link

I think there are some problems in your function input_read() in main.py.
Shouldn't we add code such like "while not coord.should_stop():" to make that the variable image_file_A always get images from variable filename_queue_A ?
Anyway ,when I run you code, there are some problems. I am confused how you can get your results.
Hope for your help, thank you

@anqier0468
Copy link
Author

Traceback (most recent call last):
File "main.py", line 364, in
main()
File "main.py", line 358, in main
model.train()
File "main.py", line 256, in train
self.input_read(sess)
File "main.py", line 100, in input_read
image_tensor = sess.run(self.image_A)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1118, in _run
feed_dict_tensor, options, run_metadata)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1315, in _do_run
options, run_metadata)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_0_input_producer' is closed and has insufficient elements (requested 1, current size 0)
[[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]
[[Node: DecodeJpeg/_21 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_5_DecodeJpeg", tensor_type=DT_UINT8, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]

Caused by op u'ReaderReadV2', defined at:
File "main.py", line 364, in
main()
File "main.py", line 358, in main
model.train()
File "main.py", line 240, in train
self.input_setup()
File "main.py", line 65, in input_setup
_, image_file_A = image_reader.read(filename_queue_A)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/ops/io_ops.py", line 194, in read
return gen_io_ops._reader_read_v2(self._reader_ref, queue_ref, name=name)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 654, in _reader_read_v2
queue_handle=queue_handle, name=name)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 789, in _apply_op_helper
op_def=op_def)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3018, in create_op
op_def=op_def)
File "/home/lthpc/virtual_tf1.3_python2.7/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1576, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

OutOfRangeError (see above for traceback): FIFOQueue '_0_input_producer' is closed and has insufficient elements (requested 1, current size 0)
[[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]
[[Node: DecodeJpeg/_21 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_5_DecodeJpeg", tensor_type=DT_UINT8, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]

@taoyunuo
Copy link

How did you solve this problem?

@dinggd
Copy link

dinggd commented Dec 8, 2017

Same promblem here!!!! Can anyone shed some light on this??? Thanks in advance.

@Mikoto10032
Copy link

Mikoto10032 commented May 3, 2018

Oh, I think I get the same problem too. Can anyone else sovle this problem?

@angad94-14
Copy link

Hello, has anyone found a way around this yet? I am facing the same issue.

@YangYongNan
Copy link

@angad94-14

main.py -> 247 and 330
init = tf.global_variables_initializer()
to
init = (tf.global_variables_initializer(),tf.local_variables_initializer());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants