在用tensorflow读取tfrecord文件时一直报这个错误,求大神指点
tensorflow吧
全部回复
仅看楼主
level 2
利用tensoflow读取TFRecord文件,一直报出这个错误
OutOfRangeError (see above for traceback): RandomShuffleQueue '_1_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: shuffle_batch = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](shuffle_batch/random_shuffle_queue, shuffle_batch/n)]]
求大神指点迷津
2018年06月29日 05点06分 1
level 1
应该是数据读取完了,你可以捕获tf.errors.OutOfRangeError异常
2018年07月13日 08点07分 2
level 1
请问楼主解决了吗
2018年11月05日 12点11分 3
学caffe吧,caffe用的更多,更方便
2018年11月06日 08点11分
level 1
刚解决这个bug 扣破脑壳
问题在于:内容没有读取出来
records = [['None']]
label = tf.decode_csv(value, record_defaults=records)
我的是因为record_defaults这个参数传错,如果你的csv文件只有1列并且是str的话,那么就传入 [['None']]
同理,两列str就是[['None'],['None']],l两列int就是[[0],[0]]
2019年02月25日 20点02分 4
多谢大佬,解决了我的问题
2020年02月18日 04点02分
大佬我读取图片和二进制的时候也这样咋搞啊
2020年10月06日 07点10分
@🔥头沙福林 你这个问题解决了吗0.0
2020年10月13日 12点10分
level 2
这个错误要么是数据有问题 数据不够 要么就是 你没初始化变量
2019年02月26日 22点02分 5
level 3
检查下是不是文件路径不对啊
2019年03月11日 11点03分 6
level 1
遇到同样的问题,我的原因是TFRecord文件的路径设置的不对,所以读取不到文件
2019年06月22日 01点06分 7
学pytorch吧
2019年06月27日 13点06分
level 1
ž这个问题怎么解决的?
2020年10月11日 11点10分 8
level 1
2020年11月29日 01点11分 9
1