MedicalReportGeneration icon indicating copy to clipboard operation
MedicalReportGeneration copied to clipboard

I got OutOfRangeError when runn train.py

Open Ike-yang opened this issue 4 years ago • 3 comments

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?

Ike-yang avatar Sep 19 '19 14:09 Ike-yang

you could see it: https://stackoverflow.com/questions/34050071/tensorflow-random-shuffle-queue-is-closed-and-has-insufficient-elements/43370673

wangleihitcs avatar Oct 10 '19 06:10 wangleihitcs

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

zBabar avatar Jan 08 '20 12:01 zBabar

And everything is in chinese there and unable to translate also

navdeep-mcm avatar Apr 21 '20 19:04 navdeep-mcm