成功解决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'
AttributeError: module ‘torch.jit‘ has no attribute ‘_script_if_tracing‘
AttributeError: module ‘torch.jit‘ has no attribute ‘_script_if_tracing‘
313 0
|
TensorFlow 算法框架/工具
成功解决AttributeError: module 'tensorflow.python.keras' has no attribute 'Model'
成功解决AttributeError: module 'tensorflow.python.keras' has no attribute 'Model'
AttributeError: module ‘torch.utils‘ has no attribute ‘data‘
属性错误:模块的'torch.utils'没有属性'data'
121 0
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
180 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‘
357 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'
291 0
|
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
|
TensorFlow 算法框架/工具
成功解决AttributeError: module tensorflow.sets has no attribute intersection
成功解决AttributeError: module tensorflow.sets has no attribute intersection
成功解决AttributeError: module tensorflow.sets has no attribute intersection
|
TensorFlow 算法框架/工具
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘