是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.mathSo 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内容请搜索靠谱客的其他文章。
发表评论 取消回复