成功解决 AttributeError: module 'tensorflow' has no attribute 'sub'

 

 

 

 

目录

解决问题

解决思路

解决方法


 

 

 

 

 

解决问题

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

 

 

 

 

 

 

解决思路

由于不同的TensorFlow版本之间某些函数的用法引起的错误

属性错误:模块“tensorflow”没有属性“sub”

 

 

 

 

 

解决方法

tf.sub

改为

tf.subtract

 

哈哈,大功告成!