我是靠谱客的博主 愤怒山水,这篇文章主要介绍tensorflow has no attribute logging,现在分享给大家,希望可以做个参考。

是tensorflow版本太高的问题。

AttributeError: module ‘tensorflow’ has no attribute ‘logging’
这样是因为tf2里面去掉了这个,目前我采用的方法只是单纯的降级。如果有其他的简单方法,欢迎告知

tf.logging was for Logging and Summary Operations and in TF 2.0 it has
been removed in favor of the open-source absl-py, and to make the main
tf.* namespace has functions that will be used more often.

In TF.2 lesser used functions are gone or moved into sub-packages like
tf.math

So instead of tf.logging you could:

tf_upgrade_v2 will upgrade script and changes tf.logging to
tf.compat.v1.logging Python logging module can be used instead Import
absl-py library share improve this answer

最后

以上就是愤怒山水最近收集整理的关于tensorflow has no attribute logging的全部内容,更多相关tensorflow内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部