fix multiple dirs in DDP mode (#113)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Laughing-q <1185102784@qq.com>
This commit is contained in:
parent
34829a6b29
commit
100e21ee80
7 changed files with 18 additions and 16 deletions
|
|
@ -45,7 +45,7 @@ class ClassificationTrainer(BaseTrainer):
|
|||
return batch
|
||||
|
||||
def get_validator(self):
|
||||
return v8.classify.ClassificationValidator(self.test_loader, self.device, logger=self.console)
|
||||
return v8.classify.ClassificationValidator(self.test_loader, self.save_dir, logger=self.console)
|
||||
|
||||
def criterion(self, preds, batch):
|
||||
loss = torch.nn.functional.cross_entropy(preds, batch["cls"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue