Skip to content
Snippets Groups Projects
Commit dd18827e authored by Rolf Sievert's avatar Rolf Sievert
Browse files

Added call to model.eval() for eval to actually work

parent 7a79b40c
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ import os ...@@ -12,6 +12,7 @@ import os
#- Update the weights for different convolution layers based on the gradients. #- Update the weights for different convolution layers based on the gradients.
def validate(model, valloader, use_cuda, epoch): def validate(model, valloader, use_cuda, epoch):
model.eval()
correct = 0 correct = 0
total = 0 total = 0
for idx, (inputs, targets) in enumerate(valloader): for idx, (inputs, targets) in enumerate(valloader):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment