zl程序教程

您现在的位置是:首页 >  其它

当前栏目

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

解决 成功 No get Tensorflow module has attribute
2023-09-14 09:04:49 时间

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

目录

解决问题

解决思路

解决方法


解决问题

AttributeError: module 'tensorflow' has no attribute 'get_variable'

解决思路

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

解决方法

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

tf.get_variable

改为

tf.compat.v1.get_variable