edcb42e678e63cd4ef9be891f3e61a9fb3370147,txtgen/core/optimization.py,,get_optimizer,#Any#,54

Before Change


    
    opt_type = hparams["type"]
    opt_kwargs = hparams["kwargs"]
    if opt_kwargs is HParams:
        opt_kwargs = opt_kwargs.todict()
    opt_modules = ["txtgen.custom",
                   "tensorflow.train",
                   "tensorflow.contrib.opt"]
    opt = utils.get_instance(opt_type, opt_kwargs, opt_modules)

After Change


    Returns:
        An instance of :class:`~tensorflow.train.Optimizer`.
    
    if hparams is None or isinstance(hparams, dict):
        hparams = HParams(
            hparams, default_optimization_hparams()["optimizer"])

    opt_type = hparams["type"]
    opt_kwargs = hparams["kwargs"].todict()
    opt_modules = ["txtgen.custom",
                   "tensorflow.train",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: asyml/texar
Commit Name: edcb42e678e63cd4ef9be891f3e61a9fb3370147
Time: 2017-10-07
Author: zhitinghu@gmail.com
File Name: txtgen/core/optimization.py
Class Name:
Method Name: get_optimizer


Project Name: asyml/texar
Commit Name: edcb42e678e63cd4ef9be891f3e61a9fb3370147
Time: 2017-10-07
Author: zhitinghu@gmail.com
File Name: txtgen/core/layers.py
Class Name:
Method Name: get_rnn_cell


Project Name: asyml/texar
Commit Name: edcb42e678e63cd4ef9be891f3e61a9fb3370147
Time: 2017-10-07
Author: zhitinghu@gmail.com
File Name: txtgen/core/layers.py
Class Name:
Method Name: get_embedding