Error: OutOfRangeError: FIFOQueue '_1_batch / fifo_queue' is closed and has insufficient elements solution

  Tensorflow error when run on the image data, the error message is as follows:

OutOfRangeError (see above for traceback): FIFOQueue '_1_batch/fifo_queue' is closed and has insufficient elements (requested 8, current size 1)
	 [[Node: batch = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_UINT8], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](batch/fifo_queue, batch/n)]]

  Read data queue information display problems, beginning always thought it was a problem tf.train.shuffle_batch parameters appear, so constantly adjust the parameters, but are invalid.

tf.train.shuffle_batch(
      tensors,
      batch_size = 16,
      capacity = 512,  # 这个参数多次调整,无效
      min_after_dequeue = 128,  # 这个参数多次调整,无效
      keep_input=True,
      num_threads=num_threads,  # 这个参数调整多次,无效
      seed=seed,
      enqueue_many=enqueue_many,
      shapes=shapes,
      allow_smaller_final_batch=allow_smaller_final_batch,
      shared_name=shared_name,
      name=name)

  The ultimate solution: the original data problem, there is an abnormal picture, delete it.

  Finally, check the data and found the original data in the presence of an abnormal picture, delete returned to normal.

  So, when faced with a similar problem, please check the original data, it may not be the bugs themselves.

"Image_295" abnormal picture
 

 

Guess you like

Origin blog.csdn.net/weixin_41713230/article/details/81539348