Skip to content

Commit e217e42

Browse files
committed
missing eval mode in recurrent neural network
1 parent 7aac812 commit e217e42

File tree

1 file changed

+1
-0
lines changed
  • tutorials/02-intermediate/recurrent_neural_network

1 file changed

+1
-0
lines changed

tutorials/02-intermediate/recurrent_neural_network/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def forward(self, x):
8585
.format(epoch+1, num_epochs, i+1, total_step, loss.item()))
8686

8787
# Test the model
88+
model.eval()
8889
with torch.no_grad():
8990
correct = 0
9091
total = 0

0 commit comments

Comments
 (0)