加载模型load_model时遇到这个报错只需要把从keras导入的都改成从tensorflow.keras导入 from tensorflow.keras.models import load_model 这样就好了