Update augment in validator (#3943)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
single_channel
Laughing 1 year ago committed by GitHub
parent 0c20a1d18d
commit 4329269c4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,6 +95,7 @@ class BaseValidator:
if trainer is passed (trainer gets priority).
"""
self.training = trainer is not None
augment = self.args.augment and (not self.training)
if self.training:
self.device = trainer.device
self.data = trainer.data
@ -159,7 +160,7 @@ class BaseValidator:
# Inference
with dt[1]:
preds = model(batch['img'], augment=self.args.augment)
preds = model(batch['img'], augment=augment)
# Loss
with dt[2]:

Loading…
Cancel
Save