Pass callbacks to validator (#7320)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
072291bc78
commit
2f9ec8c0b4
4 changed files with 13 additions and 4 deletions
|
|
@ -40,7 +40,10 @@ class SegmentationTrainer(yolo.detect.DetectionTrainer):
|
|||
def get_validator(self):
|
||||
"""Return an instance of SegmentationValidator for validation of YOLO model."""
|
||||
self.loss_names = 'box_loss', 'seg_loss', 'cls_loss', 'dfl_loss'
|
||||
return yolo.segment.SegmentationValidator(self.test_loader, save_dir=self.save_dir, args=copy(self.args))
|
||||
return yolo.segment.SegmentationValidator(self.test_loader,
|
||||
save_dir=self.save_dir,
|
||||
args=copy(self.args),
|
||||
_callbacks=self.callbacks)
|
||||
|
||||
def plot_training_samples(self, batch, ni):
|
||||
"""Creates a plot of training sample images with labels and box coordinates."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue