概述
是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 has no attribute logging所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复