From 0636888a9965be83b8b5dbf97c61e839c3ea1784 Mon Sep 17 00:00:00 2001 From: Gordon Christie Date: Mon, 3 Aug 2020 12:16:02 -0400 Subject: [PATCH] Update ml_utils.py Fixing model loading so it works with pretrained weights. --- utilities/ml_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ml_utils.py b/utilities/ml_utils.py index f6fe637..6e7374a 100644 --- a/utilities/ml_utils.py +++ b/utilities/ml_utils.py @@ -69,7 +69,7 @@ def test(args): nums = [np.int(path.split(".")[-2]) for path in weights_paths] weights_path = weights_paths[np.argsort(nums)[-1]] - model = load_model(weights_path, custom_objects={"no_nan_mse":no_nan_mse}) + model = load_model(weights_path, compile=False) predictions_dir = args.predictions_dir if sub_dir is None else os.path.join(args.predictions_dir, sub_dir) if not os.path.isdir(predictions_dir):