|
|
|
@ -169,7 +169,7 @@ class Accuracy(MetricBase):
|
|
|
|
|
return self.value / self.weight
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ChunkEvalutor(MetricBase):
|
|
|
|
|
class ChunkEvaluator(MetricBase):
|
|
|
|
|
"""
|
|
|
|
|
Accumulate counter numbers output by chunk_eval from mini-batches and
|
|
|
|
|
compute the precision recall and F1-score using the accumulated counter
|
|
|
|
@ -177,7 +177,7 @@ class ChunkEvalutor(MetricBase):
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, name=None):
|
|
|
|
|
super(ChunkEvalutor, self).__init__(name)
|
|
|
|
|
super(ChunkEvaluator, self).__init__(name)
|
|
|
|
|
self.num_infer_chunks = 0
|
|
|
|
|
self.num_label_chunks = 0
|
|
|
|
|
self.num_correct_chunks = 0
|
|
|
|
|