e185a7110ec79864dcef5114b71356691eec39df,theanolm/commands/sample.py,,sample,#,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
sys.stdout.flush()
sampler = TextSampler(network)
sequences = sampler.generate(30, args.num_sentences)
for sequence in sequences:
try:
eos_pos = sequence.index("</s>")
sequence = sequence[:eos_pos+1]
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: Rostlab/nalaf
Commit Name: ebe4256914107273feb1da940fc3e4237731365e
Time: 2016-11-11
Author: i@juanmi.rocks
File Name: nalaf/preprocessing/edges.py
Class Name: SimpleEdgeGenerator
Method Name: generate
Project Name: thoughtworksarts/EmoPy
Commit Name: a94f7b93251013d51d9918c27ab2569eb526a494
Time: 2018-02-14
Author: puneethp@thoughtworks.com
File Name: examples/convolutional_model.py
Class Name:
Method Name: