Open caoyuanbao opened 3 years ago
Hi :) “When calculate the BLEU, please uniform case of ref and hyp“, which means you should uniform the capitals and lower case letters of the reference an hypothesis file. For example, when calculate the BLEU, it maybe make "You" and "you" as defferent word.
And about the error, you can try to observe what is the dtype of the var k and var j.
Regarding the issue “IndexError: tensors used as indices must be long, byte or bool tensors” mentioned above , there is a problem in this file ./transformer/Beam.py. I have uploaded the correct one. In detail, "prev_k = best_scores_id / num_words" should be modified as "prev_k = best_scores_id // num_words" in ./transformer/Beam.py line 63.
自动回复:你好,我已经收到你的邮件,待我细看后联系曹洁
When I run "python generate_story.py", error occurs as following. It seems related to your "PS: When calculate the BLEU, please uniform case of ref and hyp", but I don't understand it. Could you explained more?