xf3227 commited on
Commit
7dc1676
·
verified ·
1 Parent(s): 7808076

Update adrd/model/adrd_model.py

Browse files

Add weights_only=False to torch.load

Files changed (1) hide show
  1. adrd/model/adrd_model.py +1 -1
adrd/model/adrd_model.py CHANGED
@@ -749,7 +749,7 @@ class ADRDModel(BaseEstimator):
749
  :type img_dict: _type_, optional
750
  """
751
  # load state_dict
752
- state_dict = torch.load(filepath, map_location=map_location)
753
 
754
  # load data modalities
755
  self.src_modalities: dict[str, dict[str, Any]] = state_dict.pop('src_modalities')
 
749
  :type img_dict: _type_, optional
750
  """
751
  # load state_dict
752
+ state_dict = torch.load(filepath, map_location=map_location, weights_only=False)
753
 
754
  # load data modalities
755
  self.src_modalities: dict[str, dict[str, Any]] = state_dict.pop('src_modalities')