Debug 路漫漫-14:Python: AttributeError: module 'tensorflow' has no attribute 'sub'

在调试 《Neural Factorization Machines for Sparse Predictive Analytics》论文的源码(https://github.com/hexiangnan/neural_factorization_machine )时,出现的问题:

Debug 路漫漫-14:Python: AttributeError: module 'tensorflow' has no attribute 'sub'

原因:

版本更新,sub 换成了 subtract 了。

 改过来之后,完美解决!:

Debug 路漫漫-14:Python: AttributeError: module 'tensorflow' has no attribute 'sub'