67c6b3fd73a79ce32e05aad74eda58bf29817b11,slm_lab/agent/algorithm/dqn.py,VanillaDQN,init_nets,#VanillaDQN#Any#,78

Before Change


        // init net optimizer and its lr scheduler
        self.optim = net_util.get_optim(self.net, self.net.optim_spec)
        self.lr_scheduler = net_util.get_lr_scheduler(self.optim, self.net.lr_scheduler_spec)
        if global_nets is not None:
            net_util.set_global_nets(self, global_nets)
        self.post_init_nets()

    def calc_q_loss(self, batch):
        """Compute the Q value loss using predicted and target Q values from the appropriate networks"""

After Change


        // init net optimizer and its lr scheduler
        self.optim = net_util.get_optim(self.net, self.net.optim_spec)
        self.lr_scheduler = net_util.get_lr_scheduler(self.optim, self.net.lr_scheduler_spec)
        net_util.set_global_nets(self, global_nets)
        self.post_init_nets()

    def calc_q_loss(self, batch):
        """Compute the Q value loss using predicted and target Q values from the appropriate networks"""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 4

Instances


Project Name: kengz/SLM-Lab
Commit Name: 67c6b3fd73a79ce32e05aad74eda58bf29817b11
Time: 2019-05-18
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: VanillaDQN
Method Name: init_nets


Project Name: kengz/SLM-Lab
Commit Name: 67c6b3fd73a79ce32e05aad74eda58bf29817b11
Time: 2019-05-18
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/actor_critic.py
Class Name: ActorCritic
Method Name: init_nets


Project Name: kengz/SLM-Lab
Commit Name: 67c6b3fd73a79ce32e05aad74eda58bf29817b11
Time: 2019-05-18
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/hydra_dqn.py
Class Name: HydraDQN
Method Name: init_nets


Project Name: kengz/SLM-Lab
Commit Name: 67c6b3fd73a79ce32e05aad74eda58bf29817b11
Time: 2019-05-18
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: DQNBase
Method Name: init_nets


Project Name: kengz/SLM-Lab
Commit Name: 67c6b3fd73a79ce32e05aad74eda58bf29817b11
Time: 2019-05-18
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/sarsa.py
Class Name: SARSA
Method Name: init_nets


Project Name: kengz/SLM-Lab
Commit Name: 67c6b3fd73a79ce32e05aad74eda58bf29817b11
Time: 2019-05-18
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/reinforce.py
Class Name: Reinforce
Method Name: init_nets