e185a7110ec79864dcef5114b71356691eec39df,theanolm/commands/sample.py,,sample,#Any#,37

Before Change


    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]
        except:
            pass
        args.output_file.write(" ".join(sequence) + "\n")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

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: elfi-dev/elfi
Commit Name: 418831c50506840b10bce58960b1ffd75080381e
Time: 2017-06-19
Author: jarno.lintusaari@aalto.fi
File Name: elfi/methods/bo/utils.py
Class Name:
Method Name: minimize


Project Name: GPflow/GPflowOpt
Commit Name: 6480335a1e997812d2277c9bb2d0931f675f5c52
Time: 2017-05-16
Author: joachim.vanderherten@ugent.be
File Name: testing/test_design.py
Class Name: _TestDesign
Method Name: test_design_compliance


Project Name: Pinafore/qb
Commit Name: cd9255c71eb93ecc74c20d867eb769c78cfac9b9
Time: 2017-05-23
Author: sjtufs@gmail.com
File Name: qanta/buzzer/test.py
Class Name:
Method Name:


Project Name: IndicoDataSolutions/Enso
Commit Name: 36e85bd581d4c660579f690db38a7b0fddf65866
Time: 2017-12-11
Author: madison@indico.io
File Name: enso/featurize/__init__.py
Class Name: Featurization
Method Name: run