BUG
AttributeError: module 'tensorflow._api.v2.train' has no attribute 'Optimizer'
BUG原因
版本迭代,相关方法被移除;
解决方案
1、降低版本
我直接将TensorFlow从2.8降到了1.14
pip install tensorflow==1.14 -i https://mirrors.aliyun.com/pypi/simple
2、不降版本,直接改api–这个我没兴趣,真懒;
问题成功解决,欢迎点赞关注!!!