Skip to content

Commit b8cacb0

Browse files
Henderakesoumith
authored andcommitted
Switch the model to evaluation mode before generation
1 parent 42e5b99 commit b8cacb0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

word_language_model/generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
with open(args.checkpoint, 'rb') as f:
4848
model = torch.load(f)
49+
model.eval()
4950

5051
if args.cuda:
5152
model.cuda()

0 commit comments

Comments
 (0)