class_docstr: Policy that derives its actions from a learned Q function.
  
  The action returned is the one that yields the highest Q value for
  a given state, as determined by the supplied Q function.
  
  Args:
      qf (object): Q network.
      env_spec (EnvSpec): Environment specification.
      name (str): Name of this policy.
docstr: Get actions corresponding to a batch of observations.
  
  Args:
      observations(torch.Tensor): Batch of observations of shape
          :math:`(N, O)`. Observations should be flattened even
          if they are images as the underlying Q network handles
          unflattening.
  
  Returns:
      torch.Tensor: Batch of actions of shape :math:`(N, A)`
docstr_tok: ["Get","actions","corresponding","to","a","batch","of","observations",".","Args",":","observations","(","torch.Tensor",")",":","Batch","of","observations","of","shape",":","math",":","`","(","N",",","O",")","`",".","Observations","should","be","flattened","even","if","they","are","images","as","the","underlying","Q","network","handles","unflattening",".","Returns",":","torch.Tensor",":","Batch","of","actions","of","shape",":","math",":","`","(","N",",","A",")","`"]
code: def forward(self, observations):
      """Get actions corresponding to a batch of observations.
  
      Args:
          observations(torch.Tensor): Batch of observations of shape
              :math:`(N, O)`. Observations should be flattened even
              if they are images as the underlying Q network handles
              unflattening.
  
      Returns:
          torch.Tensor: Batch of actions of shape :math:`(N, A)`
      """
      qs = self._qf(observations)
      return torch.argmax(qs, dim=1)
  
file_path: garage/src/garage/torch/policies/discrete_qf_argmax_policy.py
imports: import numpy
  import torch
  from garage.torch import np_to_torch
  from garage.torch.policies.policy import Policy
label_desc: Use image node_id 2 for calling the DiscreteQFArgmaxPolicy obj's underlying member method code with example usage: obj.forward(observations) and returns: torch