Commit a3932b0d authored by Christian Fuß's avatar Christian Fuß
Browse files

fixed small bug in bleu computation

parent 375b84d6
......@@ -116,7 +116,8 @@ class BLEU(mx.metric.EvalMetric):
i *= 2
match_counts = 1 / i
precisions[n] = match_counts / counts
if (match_counts / counts) > 0:
precisions[n] = match_counts / counts
bleu = self._get_brevity_penalty() * math.exp(sum(map(math.log, precisions)) / self.N)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment