# Setting config\["dueling"\]=False still runs Dueling DQN

**URL:** <https://discuss.ray.io/t/setting-config-dueling-false-still-runs-dueling-dqn/3276>\
**Category:** RLlib\
**Created:** [August 18, 2021, 4:03pm UTC](https://discuss.ray.io/t/setting-config-dueling-false-still-runs-dueling-dqn/3276 "2021-08-18T16:03:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oroojlooy](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/oroojlooy/32/1194_2.png) [@oroojlooy](https://discuss.ray.io/u/oroojlooy)\
**Post date:** [August 18, 2021, 4:03pm UTC](https://discuss.ray.io/t/setting-config-dueling-false-still-runs-dueling-dqn/3276/1 "2021-08-18T16:03:21Z")

</div>

When I set `config["dueling"]=False`, I expect to run the raw DQN in which the network returns the Q-values of each action. But, the network returns one node for the value, and the advantage value of each action. Basically, it seems that it still runs the Dueling DQN algorithms. Here is the name of the layers and their size which I got by calling `agent.get_weights()`:

```auto
'_convs.0._model.1.weight' = {ndarray: (16, 4, 8, 8)} 
'_convs.1._model.1.weight' = {ndarray: (32, 16, 4, 4)} 
'_convs.1._model.1.bias' = {ndarray: (32,)} 
'_convs.2._model.0.weight' = {ndarray: (256, 32, 11, 11)} 
'_convs.2._model.0.bias' = {ndarray: (256,)} 
'_value_branch._model.0.weight' = {ndarray: (1, 256)} 
'_value_branch._model.0.bias' = {ndarray: (1,)} 
'advantage_module.dueling_A_0._model.0.weight' = {ndarray: (256, 256)} 
'advantage_module.dueling_A_0._model.0.bias' = {ndarray: (256,)} 
'advantage_module.A._model.0.weight' = {ndarray: (4, 256)} 
'advantage_module.A._model.0.bias' = {ndarray: (4,)} 

```

```auto
    from ray.rllib.agents.dqn import DQNTrainer, DEFAULT_CONFIG
    config = DEFAULT_CONFIG.copy()
    config['num_cpus_per_worker'] = 8
    config["double_q"] = False
    config["framework"] = "torch"
    config["dueling"] = False
    config["prioritized_replay"] = False
    agent = DQNTrainer(config, 'BreakoutNoFrameskip-v0')

```

Ray version, Python version, OS: ray 1.5.1, torch 1.7.0, Cent OS 7.

---

<div class="post-metadata">

**Author:** ![michaelzhiluo](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@michaelzhiluo](https://discuss.ray.io/u/michaelzhiluo)\
**Post date:** [August 19, 2021, 9:21am UTC](https://discuss.ray.io/t/setting-config-dueling-false-still-runs-dueling-dqn/3276/2 "2021-08-19T09:21:03Z")

</div>

For reference ([ray/dqn\_torch\_model.py at d553d4da6cdacb1516a33d5744904d993e524c43 · ray-project/ray · GitHub](https://github.com/ray-project/ray/blob/d553d4da6cdacb1516a33d5744904d993e524c43/rllib/agents/dqn/dqn_torch_model.py#L74)), the weights are initialized without regards to `dueling`'s value. However, these weights are not used when `dueling=False`.

---

<div class="post-metadata">

**Author:** ![oroojlooy](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/oroojlooy/32/1194_2.png) [@oroojlooy](https://discuss.ray.io/u/oroojlooy)\
**Post date:** [August 19, 2021, 3:56pm UTC](https://discuss.ray.io/t/setting-config-dueling-false-still-runs-dueling-dqn/3276/3 "2021-08-19T15:56:27Z")

</div>

Thanks for the quick answer!
