mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Update augment in validator (#3943)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
0c20a1d18d
commit
4329269c4e
@ -95,6 +95,7 @@ class BaseValidator:
|
|||||||
if trainer is passed (trainer gets priority).
|
if trainer is passed (trainer gets priority).
|
||||||
"""
|
"""
|
||||||
self.training = trainer is not None
|
self.training = trainer is not None
|
||||||
|
augment = self.args.augment and (not self.training)
|
||||||
if self.training:
|
if self.training:
|
||||||
self.device = trainer.device
|
self.device = trainer.device
|
||||||
self.data = trainer.data
|
self.data = trainer.data
|
||||||
@ -159,7 +160,7 @@ class BaseValidator:
|
|||||||
|
|
||||||
# Inference
|
# Inference
|
||||||
with dt[1]:
|
with dt[1]:
|
||||||
preds = model(batch['img'], augment=self.args.augment)
|
preds = model(batch['img'], augment=augment)
|
||||||
|
|
||||||
# Loss
|
# Loss
|
||||||
with dt[2]:
|
with dt[2]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user