New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
about the labels #22
Comments
The labels can be None in inference. |
不好意思我可以用中文回复吗。。。。请问这个in inferenc是在你们的设想中还是在模型的推理中呢。。 sry could i reply you in Chinese? could you tell me this 'in inference' is in your inference or in models'?.. |
None不是代表正负类而是代表ground truth labels是否已知。在模型训练阶段,模型需要拟合训练集上的ground truth label,这个时候labels不是None;在模型测试阶段,ground truth label未知,模型需要预测labels,这个时候labels是None |
谢谢。。。。我重新看了一下代码。。发现了。。你在测试阶段。。。验证集和测试集的label没有传到模型里去。。。 |
I see there a line of code before output the loss
that is
if labels is not None:
labels = [torch.tensor(label) for label in labels]
labels = torch.cat(labels, dim=0).to(logits)
loss = self.loss_fnt(logits.float(), labels.float())
output = (loss.to(sequence_output),) + output
and i also tried
why sometimes the label could be none???
am I got something wrong?
The text was updated successfully, but these errors were encountered: