From 80bf74d630c7823eb99ee56a0550dba26f6c4fc5 Mon Sep 17 00:00:00 2001 From: Jindra Helcl Date: Sat, 11 Mar 2017 21:11:29 +0100 Subject: [PATCH] get rid of old perplexity evaluator --- neuralmonkey/evaluators/perplexity.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 neuralmonkey/evaluators/perplexity.py diff --git a/neuralmonkey/evaluators/perplexity.py b/neuralmonkey/evaluators/perplexity.py deleted file mode 100644 index 724826be2..000000000 --- a/neuralmonkey/evaluators/perplexity.py +++ /dev/null @@ -1,22 +0,0 @@ -import numpy as np - - -# pylint: disable=too-few-public-methods -class PerplexityEvaluator(object): - - def __init__(self, name="Perplexity"): - self.name = name - - def __call__(self, perplexities, _): - """ - Gets the average perplexity of a sentence. The list of perplexities is - provided instead of the list of decoded sentences, the reference - sentences are not needed at all. - """ - - return np.mean(perplexities) - - -# pylint: disable=invalid-name -Perplexity = PerplexityEvaluator() -# pylint: enable=invalid-name