class_docstr: Distributional dueling fully-connected Q-function with discrete actions.
class_docstr_tok: ["Distributional","dueling","fully-connected","Q-function","with","discrete","actions","."]
code: def __init__(
      self,
      n_actions,
      n_atoms,
      v_min,
      v_max,
      n_input_channels=4,
      activation=torch.relu,
      bias=0.1,
  ):
      assert n_atoms >= 2
      assert v_min < v_max
  
      self.n_actions = n_actions
      self.n_input_channels = n_input_channels
      self.activation = activation
      self.n_atoms = n_atoms
  
      super().__init__()
      self.z_values = torch.linspace(
          v_min, v_max, n_atoms, dtype=torch.float32
      )
  
      self.conv_layers = nn.ModuleList(
          [
              nn.Conv2d(n_input_channels, 32, 8, stride=4),
              nn.Conv2d(32, 64, 4, stride=2),
              nn.Conv2d(64, 64, 3, stride=1),
          ]
      )
  
      self.main_stream = nn.Linear(3136, 1024)
      self.a_stream = nn.Linear(512, n_actions * n_atoms)
      self.v_stream = nn.Linear(512, n_atoms)
  
      self.apply(init_chainer_default)
      self.conv_layers.apply(constant_bias_initializer(bias=bias))
  
file_path: pfrl/pfrl/q_functions/dueling_dqn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from pfrl import action_value
  from pfrl.initializers import init_chainer_default
  from pfrl.nn.mlp import MLP
  from pfrl.q_function import StateQFunction
label_desc: Use image node_id 1 to create a new DistributionalDuelingDQN object from inherited base classes: nn, StateQFunction with example: obj = DistributionalDuelingDQN(n_actions, n_atoms, v_min, v_max, n_input_channels, activation, bias)