Beam Search源码理解
本文的beam search源码来自:CodeBERT/model.py at master · microsoft/CodeBERT (github.com)https://github.com/microsoft/CodeBERT/blob/master/CodeBERT/code2nl/model.py理解过程中加入了注释:class Beam(object): def __init__(self, size,sos,eos): self.size = size
原创
2022-04-19 14:27:18 ·
666 阅读 ·
1 评论