Closed chenhaoenen closed 3 years ago
您好,大佬,首先非常感谢您的项目,我有个问题,请教下: 在beam search中,如果是batch输入的话, logit_score = torch.log_softmax(scores, dim=-1)[:, -1] --> 不理解为什么会取最后一个的分数,按我的理解每个batch_size的文本长度应该是不一样的吧
这个时候该如何迭代生成最终结果呢?
测试的时候,只能一个一个预测。
您好,大佬,首先非常感谢您的项目,我有个问题,请教下: 在beam search中,如果是batch输入的话, logit_score = torch.log_softmax(scores, dim=-1)[:, -1] --> 不理解为什么会取最后一个的分数,按我的理解每个batch_size的文本长度应该是不一样的吧
这个时候该如何迭代生成最终结果呢?