code: def act(self, obs, deterministic=True):
      if np.random.random() < self.epsilon:
          return np.random.choice(self.network.opt_size)
      dy.renew_cg()
      if self.dueling:
          actions, _ = self.network(obs)
          actions = actions.npvalue()
      else:
          actions = self.network(obs).npvalue()
  
      if deterministic:
          return np.argmax(actions)
      else:
          return np.random.choice(self.network.opt_size, p=actions)
  
file_path: dynet/examples/reinforcement-learning/dqn.py
imports: import dynet
  import numpy
  from memory import Memory, PrioritizedMemory
label_desc: Use image node_id 2 for calling the DeepQNetwork obj's underlying member method code with example usage: obj.act(obs, deterministic) and returns: np, np, np