Skip to content

Commit

Permalink
Switch the model to evaluation mode before generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Henderake authored and soumith committed Mar 19, 2017
1 parent 42e5b99 commit b8cacb0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions word_language_model/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

with open(args.checkpoint, 'rb') as f:
model = torch.load(f)
model.eval()

if args.cuda:
model.cuda()
Expand Down

0 comments on commit b8cacb0

Please sign in to comment.