1.把keras换成2.2.2版本就好了 pip uninstall keras pip install keras==2.2.2 pip uninstall tensorflow pip install tensorflow==2.4.1