Adieee5 commited on
Commit
3f406e3
·
verified ·
1 Parent(s): 418a07c

Update doclayout_yolo/utils/torch_utils.py

Browse files
doclayout_yolo/utils/torch_utils.py CHANGED
@@ -483,7 +483,7 @@ def strip_optimizer(f: Union[str, Path] = "best.pt", s: str = "") -> None:
483
  strip_optimizer(f)
484
  ```
485
  """
486
- x = torch.load(f, map_location=torch.device("cpu"), weights_only=True)
487
  if "model" not in x:
488
  LOGGER.info(f"Skipping {f}, not a valid Ultralytics model.")
489
  return
 
483
  strip_optimizer(f)
484
  ```
485
  """
486
+ x = torch.load(f, map_location=torch.device("cpu"), weights_only=False)
487
  if "model" not in x:
488
  LOGGER.info(f"Skipping {f}, not a valid Ultralytics model.")
489
  return