b7453958eda963b0a2bc83472731adaa76ee4d11,theanolm/commands/score.py,,_score_text,#,84
Before Change
history.append("...")
else:
history = seq_class_names[word_index::-1]
output_file.write("log(p({0} | {1})) = {2}\n".format(
seq_class_names[word_index + 1],
", ".join(history),
seq_logprobs[word_index]))
output_file.write("Sentence perplexity: {0}\n\n".format(
numpy.exp(-seq_logprob / len(seq_logprobs))))
output_file.write("Number of sentences: {0}\n".format(num_sentences))
After Change
else:
logprob = seq_logprobs[logprob_index]
logprob_index += 1
output_file.write("log(p({0} | {1})) = {2}\n".format(
predicted, history, logprob))
output_file.write("Sentence perplexity: {0}\n\n".format(
numpy.exp(-seq_logprob / len(seq_logprobs))))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: senarvi/theanolm
Commit Name: b7453958eda963b0a2bc83472731adaa76ee4d11
Time: 2015-12-11
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/score.py
Class Name:
Method Name: _score_text
Project Name: google/uis-rnn
Commit Name: 2840363fa8bc52b438f7628e6e0e676ce4c035d7
Time: 2018-11-15
Author: quanw@google.com
File Name: model/utils.py
Class Name:
Method Name: output_result
Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference