Fewshot-Learning-with-BERT icon indicating copy to clipboard operation
Fewshot-Learning-with-BERT copied to clipboard

question about label for calculating accuracy

Open zgf0907 opened this issue 11 months ago • 0 comments

train.py程序中计算准确率使用的label是随机生成的。 个人认为应该调用模型生成的label与真实label进行比较,而非随机生成的label与真实label比较,该问题导致模型训练准确率一直在0.5左右 label = torch.arange(5).repeat(10).type(torch.LongTensor).cuda() correct += float(torch.sum(logits == label).item())

zgf0907 avatar Aug 05 '23 08:08 zgf0907