a08eaf2fa930d13967fd78a8ec53069394917ad3,scripts/language_model/word_language_model.py,,,#,50

Before Change


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

context = [mx.cpu()] if args.gpus is None or args.gpus == "" else \
          [mx.gpu(int(x)) for x in args.gpus.split(",")]

assert args.batch_size % len(context) == 0, \
    "Total batch size must be multiple of the number of devices"

After Change


// Load data
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

context = [mx.cpu()] if not args.gpu else [mx.gpu(int(args.gpu))]

assert args.batch_size % len(context) == 0, \
    "Total batch size must be multiple of the number of devices"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/gluon-nlp
Commit Name: a08eaf2fa930d13967fd78a8ec53069394917ad3
Time: 2018-09-18
Author: chgwang@amazon.com
File Name: scripts/language_model/word_language_model.py
Class Name:
Method Name:


Project Name: asyml/texar
Commit Name: 4214c1f62e4c044f9d8cab5be32bb6a26d06af8b
Time: 2017-09-09
Author: zhitinghu@gmail.com
File Name: txtgen/modules/module_base.py
Class Name: ModuleBase
Method Name: __init__


Project Name: dmlc/gluon-nlp
Commit Name: 66609ec32d24b07632cf9f2d27e837de22cda744
Time: 2019-10-02
Author: szhengac@users.noreply.github.com
File Name: scripts/machine_translation/inference_transformer.py
Class Name:
Method Name: