dc0a4f77cd11b1e237b4d96186e799f79065fc98,theanolm/scoring/textscorer.py,TextScorer,score_sequence,#TextScorer#Any#Any#Any#,234

Before Change


        if numpy.isnan(logprob):
            raise NumberError("Log probability of a sequence is NaN.")
        if numpy.isinf(logprob):
            raise NumberError("Log probability of a sequence is +/- infinity.")

        return logprob

    def score_line(self, line, vocabulary):

After Change


            raise NumberError("Probability of a sequence is zero.")
        if logprob > 0.0:
            self._debug_log_batch(word_ids, class_ids, membership_probs, mask)
            raise NumberError("Probability of a sequence is greater than one.")

        return logprob

    def score_line(self, line, vocabulary):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: senarvi/theanolm
Commit Name: dc0a4f77cd11b1e237b4d96186e799f79065fc98
Time: 2017-07-17
Author: seppo.git@marjaniemi.com
File Name: theanolm/scoring/textscorer.py
Class Name: TextScorer
Method Name: score_sequence


Project Name: senarvi/theanolm
Commit Name: e7aa4187cd4abfed01e2401a90cbde042bb91c22
Time: 2015-10-14
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/optimizers/basicoptimizer.py
Class Name: BasicOptimizer
Method Name: update_minibatch


Project Name: senarvi/theanolm
Commit Name: dc0a4f77cd11b1e237b4d96186e799f79065fc98
Time: 2017-07-17
Author: seppo.git@marjaniemi.com
File Name: theanolm/scoring/textscorer.py
Class Name: TextScorer
Method Name: compute_perplexity