8c17debc9dc6552da8c317c0c852b55f03c80c61,slm_lab/agent/algorithm/dqn.py,MultitaskDQN,post_body_init,#MultitaskDQN#,227

Before Change


        self.total_action_dim = sum(self.action_dims)
        print(
            f"multitask state_dims: {self.state_dims}, sum {self.total_state_dim}")
        print(
            f"multitask action_dims: {self.action_dims}, sum {self.total_action_dim}")
        net_spec = self.agent.spec["net"]
        self.net = getattr(net, net_spec["type"])(
            self.total_state_dim, net_spec["hid_layers"], self.total_action_dim,
            hid_layers_activation=_.get(net_spec, "hid_layers_activation"),

After Change


        )
        self.online_net = self.net
        self.eval_net = self.net
        logger.info(util.self_desc(self))

    def sample(self):
        // NOTE the purpose of multi-body is to parallelize and get more batch_sizes
        batches = [body.memory.sample(self.batch_size)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: kengz/SLM-Lab
Commit Name: 8c17debc9dc6552da8c317c0c852b55f03c80c61
Time: 2017-12-24
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: MultitaskDQN
Method Name: post_body_init


Project Name: kengz/SLM-Lab
Commit Name: 8c17debc9dc6552da8c317c0c852b55f03c80c61
Time: 2017-12-24
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: DQN
Method Name: post_body_init


Project Name: kengz/SLM-Lab
Commit Name: 8c17debc9dc6552da8c317c0c852b55f03c80c61
Time: 2017-12-24
Author: kengzwl@gmail.com
File Name: slm_lab/experiment/control.py
Class Name: Session
Method Name: __init__