成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘
生活随笔
收集整理的這篇文章主要介紹了
成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
成功解決AttributeError: module 'tensorflow' has no attribute 'get_variable'
目錄
解決問題
解決思路
解決方法
解決問題
AttributeError: module 'tensorflow' has no attribute 'get_variable'
解決思路
屬性錯(cuò)誤:模塊tensorflow沒有屬性get_variable
解決方法
版本升級(jí)導(dǎo)致該方法被棄用,可以選擇修改方法,或著調(diào)用舊版本的函數(shù)去解決!
將
tf.get_variable改為
tf.compat.v1.get_variable
?
總結(jié)
以上是生活随笔為你收集整理的成功解决AttributeError: module ‘tensorflow‘ has no attribute ‘get_variable‘的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python之tushare:tusha
- 下一篇: 成功解决AttributeError: