module ‘tensorflow’ has no attribute ‘ConfigProto’/'Session’问题的解决
因为tensorflow2.0版本与之前版本有所更新,故将上述代码改成之下即可:
config
= tf
.compat
.v1
.ConfigProto
(allow_soft_placement
=True)
sess
=tf
.compat
.v1
.Session
(config
=config
)
觉得有用点个赞吧(≧▽≦)/
转载请注明原文地址: https://mac.8miu.com/read-505784.html