aeb516494daa207720b428072ab49eeea7bfff75,scripts/text_generation/sequence_sampling.py,,,#,33

Before Change


if isinstance(args.bos, str):
    args.bos = [args.bos]

lm_model, vocab = nlp.model.get_model(name=args.lm_model,
                                      dataset_name="wikitext-2",
                                      pretrained=True,
                                      ctx=ctx)

After Change


                                             help="Use random sampling for decoding.")
random_sample_parser.add_argument("--temperature", type=float, default=1.0,
                                  help="Softmax temperature used in sampling.")
random_sample_parser.add_argument("--use-top-k", type=int, required=False,
                                  help="Sample only from the top-k candidates.")

// shared options
for p in [beam_search_parser, random_sample_parser]:
    p.add_argument("--gpu", type=int, default=0,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dmlc/gluon-nlp
Commit Name: aeb516494daa207720b428072ab49eeea7bfff75
Time: 2019-06-13
Author: xshiab@ust.hk
File Name: scripts/text_generation/sequence_sampling.py
Class Name:
Method Name:


Project Name: tsurumeso/waifu2x-chainer
Commit Name: a21db577ef31a91b5ae3901389929b4ca092be00
Time: 2017-02-23
Author: nstm101339@gmail.com
File Name: waifu2x.py
Class Name:
Method Name:


Project Name: Hironsan/anago
Commit Name: b1ec0299de53bdc03870c39b00a1c88ff35cf0ea
Time: 2018-06-01
Author: hiroki.nakayama.py@gmail.com
File Name: examples/ner_glove.py
Class Name:
Method Name: