ultralytics 8.2.78 fix DDP training with pretrained weights (#15616)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
0635a40b98
commit
a6f4a9f2d4
6 changed files with 740 additions and 732 deletions
|
|
@ -381,6 +381,7 @@ class Model(nn.Module):
|
|||
"""
|
||||
self._check_is_pytorch_model()
|
||||
if isinstance(weights, (str, Path)):
|
||||
self.overrides["pretrained"] = weights # remember the weights for DDP training
|
||||
weights, self.ckpt = attempt_load_one_weight(weights)
|
||||
self.model.load(weights)
|
||||
return self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue