DDP and new dataloader Fix (#95)

Co-authored-by: Laughing-q <1185102784@qq.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Ayush Chaurasia
2022-12-26 20:05:49 +05:30
committed by GitHub
parent 16e3c08883
commit 4fb04be20b
6 changed files with 22 additions and 25 deletions

View File

@ -58,8 +58,6 @@ class DetectionTrainer(BaseTrainer):
model = DetectionModel(model_cfg or weights["model"].yaml, ch=3, nc=self.data["nc"])
if weights:
model.load(weights)
for _, v in model.named_parameters():
v.requires_grad = True # train all layers
return model
def get_validator(self):

View File

@ -21,8 +21,6 @@ class SegmentationTrainer(DetectionTrainer):
model = SegmentationModel(model_cfg or weights["model"].yaml, ch=3, nc=self.data["nc"])
if weights:
model.load(weights)
for _, v in model.named_parameters():
v.requires_grad = True # train all layers
return model
def get_validator(self):