Closed meikerwang closed 4 years ago
I think this bug is due to changes in recent pytorch versions.
I think the buggy line is: prevK = bestScoresId / numWords inside the beam advance function.
I think the original implementation was seeking an integer division here in this line, but pytorch no longer consider this as an integer division. Probably you can solve this by using // instead.
I hope we can get an answer from the original contributers.
@marnaoty Thank you for your reply and these details~ I modify the buggy line by using integer division "//" to replace float division "/" and run the code successfully Also can use floor_divide instead of true_divide
I think this bug is due to changes in recent pytorch versions.
I think the buggy line is: prevK = bestScoresId / numWords inside the beam advance function.
I think the original implementation was seeking an integer division here in this line, but pytorch no longer consider this as an integer division. Probably you can solve this by using // instead.
I hope we can get an answer from the original contributers.
Hello, I read the paper and thanks a lot for the wonderful repos. I follow the script to fine-tune the model (https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text) And I occur the problem and there are the output