5dc4b6686e5885df7d53c6162773ece336994feb,rllib/agents/dqn/dqn_torch_model.py,DQNTorchModel,__init__,#DQNTorchModel#,13

Before Change



        // Dueling case: Build the shared (advantages and value) fc-network.
        for i, n in enumerate(q_hiddens):
            advantage_module.add_module("dueling_A_{}".format(i),
                                        nn.Linear(ins, n))
            value_module.add_module("dueling_V_{}".format(i),
                                    nn.Linear(ins, n))
            // Add activations if necessary.
            if dueling_activation == "relu":

After Change



        // Dueling case: Build the shared (advantages and value) fc-network.
        for i, n in enumerate(q_hiddens):
            if use_noisy:
                advantage_module.add_module(
                    "dueling_A_{}".format(i),
                    NoisyLayer(
                        ins, n, sigma0=self.sigma0,
                        activation=dueling_activation))
                value_module.add_module(
                    "dueling_V_{}".format(i),
                    NoisyLayer(
                        ins, n, sigma0=self.sigma0,
                        activation=dueling_activation))
            else:
                advantage_module.add_module(
                    "dueling_A_{}".format(i),
                    SlimFC(ins, n, activation_fn=dueling_activation))
                value_module.add_module(
                    "dueling_V_{}".format(i),
                    SlimFC(ins, n, activation_fn=dueling_activation))
                // Add LayerNorm after each Dense.
                if add_layer_norm:
                    advantage_module.add_module(
                        "LayerNorm_A_{}".format(i), nn.LayerNorm(n))
                    value_module.add_module(
                        "LayerNorm_V_{}".format(i), nn.LayerNorm(n))
            ins = n

        // Actual Advantages layer (nodes=num-actions).
        if use_noisy:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ray-project/ray
Commit Name: 5dc4b6686e5885df7d53c6162773ece336994feb
Time: 2020-07-25
Author: sven@anyscale.io
File Name: rllib/agents/dqn/dqn_torch_model.py
Class Name: DQNTorchModel
Method Name: __init__


Project Name: ray-project/ray
Commit Name: 14160ca58c8d37ea4c08639be12c6569a80eb190
Time: 2020-07-10
Author: sven@anyscale.io
File Name: rllib/agents/dqn/dqn_torch_model.py
Class Name: DQNTorchModel
Method Name: __init__