天天看點

成功解決AttributeError: module tensorflow has no attribute lite

解決問題

   self.interp_palm = tf.lite.Interpreter(palm_model)

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

解決思路

屬性錯誤:子產品“tensorflow”沒有屬性“lite”

解決方法

參考:TensorFlow函數教程:tf.lite.Interpreter

TensorFlow版本不一緻導緻錯誤,需要将TensorFlow版本更新到TensorFlow2.0

繼續閱讀