mirror of
https://github.com/yunjey/pytorch-tutorial.git
synced 2025-07-07 01:54:41 +08:00
missing eval mode in recurrent neural network
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user