missing eval mode in recurrent neural network

This commit is contained in:
Liang Yi
2018-06-03 09:22:20 +08:00
parent 7aac81272a
commit e217e42e60

View File

@ -85,6 +85,7 @@ for epoch in range(num_epochs):
.format(epoch+1, num_epochs, i+1, total_step, loss.item()))
# Test the model
model.eval()
with torch.no_grad():
correct = 0
total = 0