add resuming (#63)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -26,10 +26,10 @@ class SegmentationTrainer(BaseTrainer):
|
||||
batch["img"] = batch["img"].to(self.device, non_blocking=True).float() / 255
|
||||
return batch
|
||||
|
||||
def load_model(self, model_cfg, weights, data):
|
||||
def load_model(self, model_cfg, weights):
|
||||
model = SegmentationModel(model_cfg or weights["model"].yaml,
|
||||
ch=3,
|
||||
nc=data["nc"],
|
||||
nc=self.data["nc"],
|
||||
anchors=self.args.get("anchors"))
|
||||
if weights:
|
||||
model.load(weights)
|
||||
|
@ -242,7 +242,7 @@ class SegmentationValidator(BaseValidator):
|
||||
cls,
|
||||
bboxes,
|
||||
masks,
|
||||
paths,
|
||||
paths=paths,
|
||||
fname=self.save_dir / f"val_batch{ni}_labels.jpg",
|
||||
names=self.names)
|
||||
|
||||
|
Reference in New Issue
Block a user