a-PyTorch-Tutorial-to-Image-Captioning icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard

why don't remove <end> for References and Hypotheses in validate ?

Open Lzhushuai opened this issue 6 years ago • 3 comments

Hi, thank you for the nice work. I'm new to image caption and the work helps me a lot. from Line 298 to Line in train.py when you wrap the list for Hypotheses and References , why don't you remove the , this tag is not part of the caption same to and . Thank, you!

Lzhushuai avatar Aug 17 '19 03:08 Lzhushuai

Maybe that's because we want to check whether the model can generate '<end>' token at the last of a sentence. As '<end>' is used to indicate the end of the generation process.

soloist97 avatar Oct 09 '19 15:10 soloist97

Hi @Lzhushuai, sorry for the really delayed reply. Yes, what @soloist97 said is right. I do, however, remove it in the final evaluation in eval.py so it doesn't contribute to the final BLEU scores.

sgrvinod avatar Feb 13 '20 04:02 sgrvinod

Hi @sgrvinod, i tried to run eval.py but "ValueError: max() arg is an empty sequence" error msg is displaying. how can i fix this error please!

LealemTilahun avatar Jul 02 '21 07:07 LealemTilahun