e185a7110ec79864dcef5114b71356691eec39df,theanolm/commands/sample.py,,sample,#Any#,37
Before Change
sys.stdout.flush()
sampler = TextSampler(network)
for i in range(args.num_sentences):
words = sampler.generate()
args.output_file.write("{}: {}\n".format(
i, " ".join(words)))
After Change
sequences = sampler.generate(30, args.num_sentences)
for sequence in sequences:
try:
eos_pos = sequence.index("</s>")
sequence = sequence[:eos_pos+1]
except:
pass
args.output_file.write(" ".join(sequence) + "\n")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: senarvi/theanolm
Commit Name: e185a7110ec79864dcef5114b71356691eec39df
Time: 2016-07-16
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/sample.py
Class Name:
Method Name: sample
Project Name: mozilla/mozregression
Commit Name: 69f1be7dec004493c2f6b1bafffc556de8b09d8a
Time: 2016-02-04
Author: wasif_hyder@hotmail.com
File Name: gui/mozregui/report_delegate.py
Class Name: AskVerdict
Method Name: __init__
Project Name: pysb/pysb
Commit Name: 590e29dd3dca1f837ab70c67f3a628c7ee032ac9
Time: 2017-05-01
Author: alubbock@users.noreply.github.com
File Name: pysb/simulator/cupsoda.py
Class Name: CupSodaSimulator
Method Name: _get_cmatrix