wanyao1992 / code_summarization_public

source code for 'Improving automatic source code summarization via deep reinforcement learning'
77 stars 30 forks source link

代码调试出现除0错误 #7

Open zoubaihan opened 3 years ago

zoubaihan commented 3 years ago

我在运行时,报如下错误: Traceback (most recent call last): File "a2c-train.py", line 348, in main() File "a2c-train.py", line 330, in main xent_trainer.train(opt.start_epoch, opt.start_reinforce - 1, start_time) File "F:\code_summarization_public-master\lib\train\Trainer.py", line 30, in train train_loss = self.train_epoch(epoch) File "F:\code_summarization_public-master\lib\train\Trainer.py", line 103, in train_epoch return total_loss / total_words ZeroDivisionError: division by zero failed. 您在实验中是否遇到类似的问题,希望您可以帮我解答一下,万分感谢!