anamjafar6 commited on
Commit
a944c81
·
verified ·
1 Parent(s): 0e03829

Update utils/model_loader.py

Browse files
Files changed (1) hide show
  1. utils/model_loader.py +1 -1
utils/model_loader.py CHANGED
@@ -57,7 +57,7 @@ def load_pytorch_model(build_fn, weights_path, device):
57
  def load_keras_model(weights_path):
58
  if not os.path.exists(weights_path):
59
  raise FileNotFoundError(f"Model not found: {weights_path}")
60
- return tf.keras.models.load_model(weights_path)
61
 
62
  def load_all_models():
63
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
57
  def load_keras_model(weights_path):
58
  if not os.path.exists(weights_path):
59
  raise FileNotFoundError(f"Model not found: {weights_path}")
60
+ return tf.keras.models.load_model(weights_path, compile=False)
61
 
62
  def load_all_models():
63
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")