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

简介: 成功解决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


相关文章
|
TensorFlow 算法框架/工具 Python
成功解决AttributeError: module 'numpy' has no attribute 'equal'
成功解决AttributeError: module 'numpy' has no attribute 'equal'
成功解决AttributeError: module 'numpy' has no attribute 'equal'
|
11月前
AttributeError: module ‘torch.utils‘ has no attribute ‘data‘
属性错误:模块的'torch.utils'没有属性'data'
68 0
|
11月前
|
Python
numpy 报错:”AttributeError: module ‘numpy‘ has no attribute ‘bool‘“
numpy 报错:”AttributeError: module ‘numpy‘ has no attribute ‘bool‘“
2129 0
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
140 0
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
251 0
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
|
PyTorch 算法框架/工具
问题解决:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
问题解决:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
233 0
|
TensorFlow 算法框架/工具
成功解决AttributeError: module 'tensorflow.python.keras' has no attribute 'Model'
成功解决AttributeError: module 'tensorflow.python.keras' has no attribute 'Model'
|
PyTorch 算法框架/工具
AttributeError: ‘model’ object has no attribute ‘copy’-pytorch
AttributeError: ‘model’ object has no attribute ‘copy’-pytorch
|
TensorFlow 算法框架/工具
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘
|
TensorFlow 算法框架/工具
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul