AttributeError: 'module' object has no attribute 'matrix_inverse'

說明

自己猜測是因為版本的語法有改變,所以產生的報錯。

AttributeError: 'module' object has no attribute 'matrix_inverse'

操作流程

參考:

https://stackoverflow.com/questions/54162343/tensorflow-object-has-no-attribute-matrix-inverse-how-to-verify-it-should-be

修改程式碼

tf.linalg.inv()

取代

 tf.matrix_inverse()

留言