在测试github上的经典推荐算法教程中的Wide&Deep模型过程中出现的问题GitHub - datawhalechina/fun-rec: 推荐系统入门教程,在线阅读地址:https://datawhalechina.github.io/fun-rec/
1.将教程中的代码在Pycharm中测试运行,发现导入包时标红
通过查看具体路径发现keras在tensorflow = 2.16.1版本下存入了tensorflow.python中
因此直接修改路径即可,修改后不再标红
2.运行时报错:AttributeError: 'Variable' object has no attribute '_distribute_strategy'
问题为tensorflow版本问题,将2.16.1降低为2.13.1问题解决,程序正常运行