bert Do_predict does not make predictions for all instances in the test.tsv

guicsvcw  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(61)

The number of sentences in the first file is $1110$, and the number of predictions in the second file is $1109$. So, there are $9$ extra predictions.

If we assume that each sentence has a unique prediction, then these predictions must come from the third file. Therefore, the third file must have $9$ more predictions than it should.

So, the number of predictions in the third file is $1109+9=\boxed{1118}$.

h7appiyu

h7appiyu1#

Hi @Mahhos :tsv文件的第一行是否有表头?如果有,那么你将得到1109个预测结果,不包括表头。
如果不是这种情况,请尝试在tsv文件中添加一个id列,并将其与预测结果进行匹配,以便找到缺失的句子。

nuypyhwy

nuypyhwy2#

你好@AbinayaM02和@Mahhos,你们找到这个问题的原因了吗?我们知道哪个预测缺失了吗?是第一行、中间还是测试集的最后一行?谢谢。
编辑:大家好,已经找到了问题。请查看:https://stackoverflow.com/questions/62161281/bert-skipping-the-1st-row-of-test-tsv-when-predicting

相关问题