成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘

╰+哭是因爲堅強的太久メ 2022-09-15 12:58 211阅读 0赞

成功解决AttributeError: module ‘tensorflow’ has no attribute ‘get_variable’

目录

解决问题

解决思路

解决方法


解决问题

AttributeError: module ‘tensorflow’ has no attribute ‘get_variable’

解决思路

属性错误:模块tensorflow没有属性get_variable

解决方法

版本升级导致该方法被弃用,可以选择修改方法,或着调用旧版本的函数去解决!

  1. tf.get_variable

改为

  1. tf.compat.v1.get_variable

发表评论

表情:
评论列表 (有 0 条评论,211人围观)

还没有评论,来说两句吧...

相关阅读