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 got OutOfRangeError when runn train.py #1

Open
Ike-yang opened this issue Sep 19, 2019 · 3 comments
Open

I got OutOfRangeError when runn train.py #1

Ike-yang opened this issue Sep 19, 2019 · 3 comments

Comments

@Ike-yang
Copy link

Hi, I got error like this
Error message as showing below:
Traceback (most recent call last):
File "/home/ike/Workspace/MedicalReportGeneration/train.py", line 101, in
train()
File "/home/ike/Workspace/MedicalReportGeneration/train.py", line 39, in train
images_frontal, images_lateral, sentences, masks, image_ids = sess.run([image_frontal_batch, image_lateral_batch, sentence_batch, mask_batch, image_id_batch])
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
run_metadata)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: RandomShuffleQueue '_1_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 26, current size 0)
[[Node: shuffle_batch = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_FLOAT, DT_INT64, DT_INT64, DT_INT64], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](shuffle_batch/random_shuffle_queue, shuffle_batch/n)]]

Caused by op u'shuffle_batch', defined at:
File "/home/ike/Workspace/MedicalReportGeneration/train.py", line 101, in
train()
File "/home/ike/Workspace/MedicalReportGeneration/train.py", line 17, in train
image_frontal_batch, image_lateral_batch, sentence_batch, mask_batch, image_id_batch = datasets.get_train_batch(c.train_tfrecord_path, c, md.batch_size)
File "/home/ike/Workspace/MedicalReportGeneration/datasets.py", line 38, in get_train_batch
min_after_dequeue=2 * batch_size
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 1300, in shuffle_batch
name=name)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 846, in _shuffle_batch
dequeued = queue.dequeue_many(batch_size, name=name)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/ops/data_flow_ops.py", line 483, in dequeue_many
self._queue_ref, n=n, component_types=self._dtypes, name=name)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 3480, in queue_dequeue_many_v2
component_types=component_types, timeout_ms=timeout_ms, name=name)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/home/ike/anaconda3/envs/MICCAI/lib/python2.7/site-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): RandomShuffleQueue '_1_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 26, current size 0)
[[Node: shuffle_batch = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_FLOAT, DT_INT64, DT_INT64, DT_INT64], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](shuffle_batch/random_shuffle_queue, shuffle_batch/n)]]

any suggestion?

@zBabar
Copy link

zBabar commented Jan 8, 2020

do you know how to download the processed zip files especially for pretrain_model... it asks for extraction code when i open the link.

@navdeep-mcm
Copy link

And everything is in chinese there and unable to translate also

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

4 participants