tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue

本文记录了一次在使用TensorFlow进行图片解码时遇到的OutOfRangeError错误,详细描述了错误信息及排查过程,最终发现是由于解码GIF图片导致的问题,并通过切换到JPEG格式成功解决了该错误。

这个错误 服了

错误原因:

tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_2_batch/fifo_queue' is closed and has insufficient elements (requested 2800, current size 0)
     [[{{node batch}} = QueueDequeueManyV2[component_types=[DT_UINT8], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](batch/fifo_queue, batch/n)]]

 

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

一脸懵B  什么错误!

原因:

我要解码图片gif类型的     

tf.image.xxx     出现decode_gif   自然加上

.decode_gif(value)    发现一直报错

最后 切换jepg  发现成功解决= =

.decode_jpeg(value)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值