5f1388ca05428f0cf5e16a8114b0720267e315bd,deeppavlov/core/models/tf_model.py,TFModel,get_train_op,#TFModel#Any#Any#Any#Any#Any#Any#,69

Before Change


            else:
                variables_to_train = []
                for scope_name in learnable_scopes:
                    for var in tf.global_variables():
                        if scope_name in var.name:
                            variables_to_train.append(var)

            if optimizer is None:
                optimizer = tf.train.AdamOptimizer

            // For batch norm it is necessary to update running averages

After Change


            opt_scope = tf.variable_scope(optimizer_scope_name)
        with opt_scope:
            if learnable_scopes is None:
                variables_to_train = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)
            else:
                variables_to_train = []
                for scope_name in learnable_scopes:
                    variables_to_train.extend(tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope=scope_name))

            if optimizer is None:
                optimizer = tf.train.AdamOptimizer
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 5f1388ca05428f0cf5e16a8114b0720267e315bd
Time: 2018-09-12
Author: peganov@phystech.edu
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: get_train_op


Project Name: MorvanZhou/tutorials
Commit Name: 45a1d730e78a711132dbf16e856c32e5711d7f12
Time: 2017-02-21
Author: morvanzhou@hotmail.com
File Name: Reinforcement_learning_TUT/6_OpenAI_gym/RL_brain.py
Class Name: DeepQNetwork
Method Name: _replace_target_params


Project Name: deepmipt/DeepPavlov
Commit Name: 5f1388ca05428f0cf5e16a8114b0720267e315bd
Time: 2018-09-12
Author: peganov@phystech.edu
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: get_train_op


Project Name: MorvanZhou/tutorials
Commit Name: 45a1d730e78a711132dbf16e856c32e5711d7f12
Time: 2017-02-21
Author: morvanzhou@hotmail.com
File Name: Reinforcement_learning_TUT/5_Deep_Q_Network/RL_brain.py
Class Name: DeepQNetwork
Method Name: _replace_target_params