Skip to content

Commit

Permalink
update torch load method
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanyong Duan committed Jan 30, 2025
1 parent e3f4a6e commit fa1c09b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anomaly_detector/multivariate/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def save_checkpoint(self):
self.model.to(self.config.device)

def load_checkpoint(self, model_path):
ckpt = torch.load(model_path)
ckpt = torch.load(model_path, weights_only=True)
self.config = ckpt["config"]
self.model = MultivariateGraphAttnDetector(self.config)
self.model.load_state_dict(ckpt["state_dict"])
Expand Down

0 comments on commit fa1c09b

Please sign in to comment.