Skip to content

Commit

Permalink
Update ml_utils.py
Browse files Browse the repository at this point in the history
Fixing model loading so it works with pretrained weights.
  • Loading branch information
gordonac authored Aug 3, 2020
1 parent 51c9298 commit 0636888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities/ml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0636888

Please sign in to comment.