docstr: Defines a DummyNet class as a simple continuous dist function.
  
  It has a clear maximum at the specified anchor_point. By default, all
  action dimensions for all batches must be near the anchor point.
  
  Args:
    input_tensor_spec: Input Tensor Spec.
    sampler_type: One of 'continuous', 'continuous_and_one_hot' and 'hybrid'.
    anchor_point: The point around which we want the Q-function to have a max.
      Independently applied to each action dimension for each sample in the
      batch.
    dist: If DIST_L1, then negative of L1 distance from anchor point is used
      for q_value. DIST_BIMODAL, a bimodal Gaussian function is used: one
      larger mode centered around the anchor point and one smaller mode
      centered around LOCAL_MAX_BIMODAL. In both cases, the q_func should have
      a maxima at the specified anchor point.
    categorical_action_returns: If not None, tells the rewards for each
      categorical action. So [10., 0.] would mean that first categorical
      action is very important. [0., 10.] will indicate the second one is very
      important. So the CEM is expected to output the respective one as the
      best possible action instead of something close to the anchor point.
docstr_tok: ["Defines","a","DummyNet","class","as","a","simple","continuous","dist","function",".","It","has","a","clear","maximum","at","the","specified","anchor_point",".","By","default",",","all","action","dimensions","for","all","batches","must","be","near","the","anchor","point",".","Args",":","input_tensor_spec",":","Input","Tensor","Spec",".","sampler_type",":","One","of","'continuous","'",",","'continuous_and_one_hot","'","and","'hybrid","'",".","anchor_point",":","The","point","around","which","we","want","the","Q-function","to","have","a","max",".","Independently","applied","to","each","action","dimension","for","each","sample","in","the","batch",".","dist",":","If","DIST_L1",",","then","negative","of","L1","distance","from","anchor","point","is","used","for","q_value",".","DIST_BIMODAL",",","a","bimodal","Gaussian","function","is","used",":","one","larger","mode","centered","around","the","anchor","point","and","one","smaller","mode","centered","around","LOCAL_MAX_BIMODAL",".","In","both","cases",",","the","q_func","should","have","a","maxima","at","the","specified","anchor","point",".","categorical_action_returns",":","If","not","None",",","tells","the","rewards","for","each","categorical","action",".","So","[","10.",",","0",".","]","would","mean","that","first","categorical","action","is","very","important",".","[","0.",",","10",".","]","will","indicate","the","second","one","is","very","important",".","So","the","CEM","is","expected","to","output","the","respective","one","as","the","best","possible","action","instead","of","something","close","to","the","anchor","point","."]
code: def __init__(
      self,
      input_tensor_spec,
      sampler_type=None,
      anchor_point=0.0,
      dist=DIST_BIMODAL,
      categorical_action_returns=None,
  ):
      """Defines a DummyNet class as a simple continuous dist function.
  
      It has a clear maximum at the specified anchor_point. By default, all
      action dimensions for all batches must be near the anchor point.
  
      Args:
        input_tensor_spec: Input Tensor Spec.
        sampler_type: One of 'continuous', 'continuous_and_one_hot' and 'hybrid'.
        anchor_point: The point around which we want the Q-function to have a max.
          Independently applied to each action dimension for each sample in the
          batch.
        dist: If DIST_L1, then negative of L1 distance from anchor point is used
          for q_value. DIST_BIMODAL, a bimodal Gaussian function is used: one
          larger mode centered around the anchor point and one smaller mode
          centered around LOCAL_MAX_BIMODAL. In both cases, the q_func should have
          a maxima at the specified anchor point.
        categorical_action_returns: If not None, tells the rewards for each
          categorical action. So [10., 0.] would mean that first categorical
          action is very important. [0., 10.] will indicate the second one is very
          important. So the CEM is expected to output the respective one as the
          best possible action instead of something close to the anchor point.
      """
      self._sampler_type = sampler_type
      self._anchor_point = anchor_point
      self._dist = dist
      self._categorical_action_returns = categorical_action_returns
  
      _, action_spec = input_tensor_spec
      flat_action_spec = tf.nest.flatten(action_spec)
      if len(flat_action_spec) == 2:
          if flat_action_spec[0].dtype.is_floating:
              self.idx_continuous = 0
          else:
              self.idx_continuous = 1
      else:
          self.idx_continuous = 0
  
      super(DummyNet, self).__init__(input_tensor_spec, (), "DummyNet")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import flags
  from absl import logging
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.networks import network
  from tf_agents.policies import qtopt_cem_policy
  from tf_agents.policies.samplers import qtopt_cem_actions_sampler_continuous
  from tf_agents.policies.samplers import qtopt_cem_actions_sampler_continuous_and_one_hot
  from tf_agents.policies.samplers import qtopt_cem_actions_sampler_hybrid
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 1 to create a new DummyNet object from inherited base classes: network with example: obj = DummyNet(input_tensor_spec, sampler_type, anchor_point, dist, categorical_action_returns)