from keras.models import model_from_json import numpy as np json_file = open('xception.json', 'r') loaded_file_json = json_file.read() json_file.close() model = model_from_json(loaded_file_json) model.load_weights('xception_modelv2.h5')