class_docstr: Dueling Q-Network
  
  See: http://arxiv.org/abs/1511.06581
class_docstr_tok: ["Dueling","Q-Network","See",":","http",":","\/\/arxiv.org\/abs\/1511.06581"]
code: def __call__(self, x):
      h = x
      for link in self.conv_layers:
          h = self.activation(link(h))
  
      # Advantage
      batch_size = x.shape[0]
      ya = self.a_stream(h)
      mean = F.reshape(
          F.sum(ya, axis=1) / self.n_actions, (batch_size, 1)
      )
      ya, mean = F.broadcast(ya, mean)
      ya -= mean
  
      # State value
      ys = self.v_stream(h)
  
      ya, ys = F.broadcast(ya, ys)
      q = ya + ys
      return action_value.DiscreteActionValue(q)
  
file_path: chainerrl/chainerrl/q_functions/dueling_dqn.py
imports: import chainer
  from chainer import functions
  from chainer import links
  import numpy
  from chainerrl import action_value
  from chainerrl.links.mlp import MLP
  from chainerrl.q_function import StateQFunction
  from chainerrl.recurrent import RecurrentChainMixin
label_desc: Use image node_id 2 for calling the DuelingDQN obj's underlying member method code with example usage: obj.__call__(x) and returns: action_value