tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue
覺得有用的話,歡迎一起討論相互學習~
今天遇到了這個問題
tensorflow.python.framework.errors_impl.OutOfRangeError:
FIFOQueue '_0_input_producer' is closed and has insufficient elements (requested 1, current size 0)
[[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]
經過查找資料:local變量沒有初始化.
初始化變量語句改成:
init_op = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer())
sess.run(init_op)