45a1d730e78a711132dbf16e856c32e5711d7f12,Reinforcement_learning_TUT/5_Deep_Q_Network/RL_brain.py,DeepQNetwork,_replace_target_params,#DeepQNetwork#,160

Before Change


        return action

    def _replace_target_params(self):
        replace_ops = []
        for layer, params in enumerate(self._eval_net_params):
            replace_op = [tf.assign(self._target_net_params[layer][W_b], params[W_b]) for W_b in range(2)]
            replace_ops.append(replace_op)
        self.sess.run(replace_ops)

    def learn(self):
        // check to replace target parameters

After Change


    def _replace_target_params(self):
        t_params = tf.get_collection("target_net_params")
        e_params = tf.get_collection("eval_net_params")
        self.sess.run([tf.assign(t, e) for t, e in zip(t_params, e_params)])

    def learn(self):
        // check to replace target parameters
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


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


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: a3b39f9e6e7e1b33a3eb9919923d939430b60b86
Time: 2017-09-01
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATdx.py
Class Name:
Method Name: QA_fetch_get_stock_latest


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: 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