class_docstr: Q net with categorical scalar action space.
  
  Args:
      action_space (optional): An instance of :class:`~texar.tf.agents.Space`
          specifying the action space. If not given, an discrete action space
          `[0, high]` is created with `high` specified in :attr:`hparams`.
      network (optional): A network that takes in state and returns
          Q values. For example, an instance of subclass
          of :class:`~texar.tf.modules.FeedForwardNetworkBase`. If `None`,
          a network is created as specified in :attr:`hparams`.
      network_kwargs (dict, optional): Keyword arguments for network
          constructor.
          Note that the `hparams` argument for network
          constructor is specified in the "network_hparams" field of
          :attr:`hparams` and should not be included in `network_kwargs`.
          Ignored if :attr:`network` is given.
      hparams (dict or HParams, optional): Hyperparameters. Missing
          hyperparamerter will be set to default values. See
          :meth:`default_hparams` for the hyperparameter sturcture and
          default values.
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Q","net","with","categorical","scalar","action","space",".","Args",":","action_space","(","optional",")",":","An","instance","of",":","class",":","`","~texar.tf.agents.Space","`","specifying","the","action","space",".","If","not","given",",","an","discrete","action","space","`","[","0",",","high","]","`","is","created","with","`","high","`","specified","in",":","attr",":","`","hparams","`",".","network","(","optional",")",":","A","network","that","takes","in","state","and","returns","Q","values",".","For","example",",","an","instance","of","subclass","of",":","class",":","`","~texar.tf.modules.FeedForwardNetworkBase","`",".","If","`","None","`",",","a","network","is","created","as","specified","in",":","attr",":","`","hparams","`",".","network_kwargs","(","dict",",","optional",")",":","Keyword","arguments","for","network","constructor",".","Note","that","the","`","hparams","`","argument","for","network","constructor","is","specified","in","the","``","network_hparams","''","field","of",":","attr",":","`","hparams","`","and","should","not","be","included","in","`","network_kwargs","`",".","Ignored","if",":","attr",":","`","network","`","is","given",".","hparams","(","dict","or","HParams",",","optional",")",":","Hyperparameters",".","Missing","hyperparamerter","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","sturcture","and","default","values",".","..","document","private","functions","..","automethod",":",":","_build"]
code: def _append_output_layer(self):
      if not self._hparams.make_output_layer:
          return
  
      if self._action_space.shape != ():
          raise ValueError("Only scalar discrete action is supported.")
      else:
          output_size = self._action_space.high - self._action_space.low
  
      layer_hparams = {
          "type": "Dense",
          "kwargs": {"units": output_size},
      }
      self._network.append_layer(layer_hparams)
  
file_path: texar/texar/tf/modules/qnets/qnets.py
imports: import numpy
  import tensorflow
  from texar.tf.module_base import ModuleBase
  from texar.tf.agents.agent_utils import Space
  from texar.tf.utils import utils
label_desc: Use image node_id 3 for calling the CategoricalQNet obj's underlying member method code with example usage: obj._append_output_layer() without return types