yhcc / BARTNER

215 stars 22 forks source link

mapping = torch.LongTensor([0, 2]+label_ids) #15

Open jingsongs opened 2 years ago

jingsongs commented 2 years ago

您好! 想咨询下,FBartDecoder类中,mapping = torch.LongTensor([0, 2]+label_ids) 其中的 0, 2 代表什么?

yhcc commented 2 years ago

0和2分别是bart的start-of-sentence和end-of-sentence。

jingsongs commented 2 years ago

谢谢