Keras 对 tf.data 数据集的预测不会停止

Keras predictions on tf.data dataset doesn't stop

我 运行 遇到了使用生成器为我的模型进行预测的问题。 根据 documentation if steps = None 预测整个数据集应该 运行。 但是相反,它过去了,我又重新开始了。我在图像数据集上使用 flow_from_dataframe

我应该将步长固定为 ceil(len(dataset) / batch_size) 吗?

提前致谢!

嗯,这不是真正的解决方案,但将步长固定为数据集的长度就可以了。 我猜必须更新文档。