Skip to content

Commit 0694263

Browse files
committed
Make sure to use vocab in infos when evaluating.
1 parent a88a6d8 commit 0694263

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eval.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@
112112
'coco_json': opt.coco_json,
113113
'batch_size': opt.batch_size,
114114
'cnn_model': opt.cnn_model})
115-
loader.ix_to_word = infos['vocab']
115+
# When eval using provided pretrained model, the vocab may be different from what you have in your cocotalk.json
116+
# So make sure to use the vocab in infos file.
117+
loader.ix_to_word = infos['vocab']
116118

117119

118120
# Set sample options

0 commit comments

Comments
 (0)