我是靠谱客的博主 强健裙子,这篇文章主要介绍keras报错:ValueError: `steps_per_epoch=None` is only valid for a generator based on the `keras.utils.S,现在分享给大家,希望可以做个参考。

keras报错:

ValueError: `steps_per_epoch=None` is only valid for a generator based on the `keras.utils.Sequence` class. Please specify `steps_per_epoch` or use the `keras.utils.Sequence` class.

解决方法:

在fit_generator中添加参数:

复制代码
1
steps_per_epoch=x_train.shape[0],

 

最后

以上就是强健裙子最近收集整理的关于keras报错:ValueError: `steps_per_epoch=None` is only valid for a generator based on the `keras.utils.S的全部内容,更多相关keras报错:ValueError:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部