bert-multi-gpu icon indicating copy to clipboard operation
bert-multi-gpu copied to clipboard

mlabel task 结果定义

Open jackie930 opened this issue 6 years ago • 2 comments

hi,

我基于您的代码写了一个two label task,每个label是个multi-class问题,结果我看到在保存结果的output文件夹下的csv文件有两列,不太明白这两列的含义。在单label的task种,是生成n列,每列是每个class的概率。这里怎么理解呢?谢谢 image

jackie930 avatar Nov 02 '20 14:11 jackie930

hi,

我基于您的代码写了一个two label task,每个label是个multi-class问题,结果我看到在保存结果的output文件夹下的csv文件有两列,不太明白这两列的含义。在单label的task种,是生成n列,每列是每个class的概率。这里怎么理解呢?谢谢 image

这里的multi-label指的是多个二分类任务。在run_custom_classifier_mlabel.py中,每个样本的概率为sigmoid函数输出(第516行),样本的loss为交叉熵(第522,523行)。所以最终的预测输出为每个任务label=1的概率。每一行输出如:y_pred_task_1, y_pred_task_2, ... , y_pred_task_n.

shishishu avatar Nov 03 '20 16:11 shishishu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 04 '20 21:12 stale[bot]