OutOfRangeError closed and has insufficient elements (requested 512, current size 362)

来源:互联网 发布:人人商城源码下载 编辑:程序博客网 时间:2024/05/16 19:16


一般来说:capacity的计算公式是: capacity=min_after_dequeue+3*batch_size

1.capacity的计算不对会引发这个问题,

2.num_threads=64 也会引发这个问题,解决方法:把这个暂时去掉,原因尚未知

image_batch, label_batch = tf.train.shuffle_batch([image,label],                                                 batch_size=batch_size,                                                 # num_threads=64,                                                 capacity=capacity,                                                 min_after_dequeue=1000)

解决方法:把num_threads=64 删掉

image_batch, label_batch = tf.train.shuffle_batch([image,label],                                                 batch_size=batch_size,                                                 # num_threads=64,                                                 capacity=capacity,                                                 min_after_dequeue=1000)

阅读全文
0 0
原创粉丝点击