From dd18827e956a1c58aee8502003f62cfcba77e8d4 Mon Sep 17 00:00:00 2001 From: Rolf Sievert <rolsi701@student.liu.se> Date: Mon, 23 Sep 2019 17:40:23 +0200 Subject: [PATCH] Added call to model.eval() for eval to actually work --- python/train.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/train.py b/python/train.py index 036eb69..a9c94ec 100644 --- a/python/train.py +++ b/python/train.py @@ -12,6 +12,7 @@ import os #- Update the weights for different convolution layers based on the gradients. def validate(model, valloader, use_cuda, epoch): + model.eval() correct = 0 total = 0 for idx, (inputs, targets) in enumerate(valloader): -- GitLab