我是靠谱客的博主 怕孤独蚂蚁,这篇文章主要介绍tensorflow 2.4.1When using data tensors as input to a model, you should specify the steps_per_epoch,现在分享给大家,希望可以做个参考。

版本:
tensorflow 2.4.1,cuda 11.0,cudnn 8.0.4

问题:
在不改变环境的情况下,突然就出现了
valueError: When using data tensors as input to a model, you should specify the steps_per_epoch argument.

临时解决办法:
因为写完steps_per_epoch之后又报错out of range,在并不是特别了解这里机制的情况下,不要把数据类型转为tf.float32之类的tensor就不报错了
但事发过于突兀,暂时还不清楚具体缘由

最后

以上就是怕孤独蚂蚁最近收集整理的关于tensorflow 2.4.1When using data tensors as input to a model, you should specify the steps_per_epoch的全部内容,更多相关tensorflow内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部