From 2b373003c7c41588acba7fe87c048b31f40c2d1a Mon Sep 17 00:00:00 2001 From: CharlieZCJ Date: Thu, 14 Nov 2024 15:12:19 +0800 Subject: [PATCH] Fixing warning message. --- odak/learn/wave/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odak/learn/wave/models.py b/odak/learn/wave/models.py index 7ff3e6af..61f4f379 100644 --- a/odak/learn/wave/models.py +++ b/odak/learn/wave/models.py @@ -259,7 +259,7 @@ def load_weights(self, weight_filename, key_mapping_filename): Path to the JSON file containing the key mappings. """ # Load old model weights - old_model_weights = torch.load(weight_filename, map_location = self.device) + old_model_weights = torch.load(weight_filename, map_location = self.device,weights_only=True) # Load key mappings from JSON file with open(key_mapping_filename, 'r') as json_file: