79e7954005167bb6ef0785def3ed0954b8f06f55,theanolm/scoring/textscorer.py,TextScorer,score_sequence,#TextScorer#Any#Any#Any#,209
Before Change
logprobs[word_ids[1:] == self._unk_id] = self._unk_penalty
// If requested, zero out logprobs predicting <unk> token.
if self._ignore_unk:
logprobs[word_ids[1:] == self._unk_id] = 0
logprob = logprobs.sum()
if numpy.isnan(logprob):
After Change
mask[1:])
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
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: senarvi/theanolm
Commit Name: 79e7954005167bb6ef0785def3ed0954b8f06f55
Time: 2016-11-14
Author: seppo.git@marjaniemi.com
File Name: theanolm/scoring/textscorer.py
Class Name: TextScorer
Method Name: score_sequence
Project Name: HyperGAN/HyperGAN
Commit Name: 779ced0fabaaad57feedf544f452a69cf1c9baf6
Time: 2017-08-28
Author: mikkel@255bits.com
File Name: examples/2d-distribution.py
Class Name:
Method Name: train
Project Name: scipy/scipy
Commit Name: 6df3a4849b1e9f5ecc35ce78995b4544888e22f1
Time: 2015-12-13
Author: andyfaff@gmail.com
File Name: scipy/optimize/_differentialevolution.py
Class Name: DifferentialEvolutionSolver
Method Name: evolve