|
|
@ -665,8 +665,12 @@ class Eynollah:
|
|
|
|
if model_dir in self.models:
|
|
|
|
if model_dir in self.models:
|
|
|
|
model = self.models[model_dir]
|
|
|
|
model = self.models[model_dir]
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
model = load_model(model_dir, compile=False)
|
|
|
|
try:
|
|
|
|
self.models[model_dir] = model
|
|
|
|
model = load_model(model_dir, compile=False)
|
|
|
|
|
|
|
|
self.models[model_dir] = model
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
|
|
|
model = load_model(model_dir , compile=False,custom_objects = {"PatchEncoder": PatchEncoder, "Patches": Patches})
|
|
|
|
|
|
|
|
self.models[model_dir] = model
|
|
|
|
|
|
|
|
|
|
|
|
return model, None
|
|
|
|
return model, None
|
|
|
|
|
|
|
|
|
|
|
|