class_docstr: Q-function output for discrete action space.
  
  Args:
      q_values (torch.Tensor):
          Array of Q values whose shape is (batchsize, n_actions)
class_docstr_tok: ["Q-function","output","for","discrete","action","space",".","Args",":","q_values","(","torch.Tensor",")",":","Array","of","Q","values","whose","shape","is","(","batchsize",",","n_actions",")"]
code: def __init__(self, q_values, q_values_formatter=lambda x: x):
      assert isinstance(q_values, torch.Tensor)
      self.device = q_values.device
      self.q_values = q_values
      self.n_actions = q_values.shape[1]
      self.q_values_formatter = q_values_formatter
  
imports: import warnings
  from abc import ABCMeta, abstractmethod, abstractproperty
  import torch
  import torch.nn.functional
  from torch.distributions.utils import lazy_property
label_desc: Use image node_id 1 to create a new DiscreteActionValue object from inherited base classes: ActionValue with example: obj = DiscreteActionValue(q_values, q_values_formatter)