sighan¶
-
class
DetectionF1
(pos_label=1, name='DetectionF1', *args, **kwargs)[源代码]¶ 基类:
paddle.metric.metrics.Metric
-
update
(preds, labels, length, *args)[源代码]¶ Update states for metric
Inputs of
update
is the outputs ofMetric.compute
, ifcompute
is not defined, the inputs ofupdate
will be flatten arguments of output of mode and label from data:update(output1, output2, ..., label1, label2,...)
see
Metric.compute
-
-
class
CorrectionF1
(pos_label=1, name='CorrectionF1', *args, **kwargs)[源代码]¶ 基类:
paddlenlp.metrics.sighan.DetectionF1
-
update
(det_preds, det_labels, corr_preds, corr_labels, length, *args)[源代码]¶ Update states for metric
Inputs of
update
is the outputs ofMetric.compute
, ifcompute
is not defined, the inputs ofupdate
will be flatten arguments of output of mode and label from data:update(output1, output2, ..., label1, label2,...)
see
Metric.compute
-