edcb42e678e63cd4ef9be891f3e61a9fb3370147,txtgen/core/layers.py,,get_embedding,#Any#Any#Any#Any#,205

Before Change


    with tf.variable_scope(variable_scope, "embedding"):
        if init_values is None:
            kwargs = hparams["initializer"]["kwargs"]
            if isinstance(kwargs, HParams):
                kwargs = kwargs.todict()
            initializer = get_instance(hparams["initializer"]["type"],
                                       kwargs,
                                       ["txtgen.custom", "tensorflow"])
            return tf.get_variable(name=hparams["name"],

After Change


        if hparams is None or isinstance(hparams, dict):
            hparams = HParams(hparams, default_embedding_hparams())
        if init_values is None:
            kwargs = hparams["initializer"]["kwargs"].todict()
            initializer = get_instance(hparams["initializer"]["type"],
                                       kwargs,
                                       ["txtgen.custom", "tensorflow"])
            return tf.get_variable(name=hparams["name"],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


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