From ad6286693eadcfd9e92dde879b395f26bc569c10 Mon Sep 17 00:00:00 2001 From: Jianbang Yang Date: Thu, 17 Aug 2023 13:57:41 +0800 Subject: [PATCH] Fix resnet50 evaluation --- training/benchmarks/resnet50/pytorch/train/trainer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/training/benchmarks/resnet50/pytorch/train/trainer.py b/training/benchmarks/resnet50/pytorch/train/trainer.py index 41cdb6eeb..3a5960919 100755 --- a/training/benchmarks/resnet50/pytorch/train/trainer.py +++ b/training/benchmarks/resnet50/pytorch/train/trainer.py @@ -126,6 +126,7 @@ def train_one_epoch(self, train_dataloader, eval_dataloader): @torch.no_grad() def evaluate(self, model, data_loader, device): + model.eval() acc1_total = 0.0 steps = 0 for step, batch in enumerate(data_loader):