parameters: (
        self,
        temperature,
        logits=None,
        probs=None,
        dtype=dtypes.float32,
        validate_args=False,
        allow_nan_stats=True,
        name="ExpRelaxedOneHotCategorical")
docstring: Initialize ExpRelaxedOneHotCategorical using class log-probabilities.
  
      Args:
        temperature: An 0-D `Tensor`, representing the temperature
          of a set of ExpRelaxedCategorical distributions. The temperature should
          be positive.
        logits: An N-D `Tensor`, `N >= 1`, representing the log probabilities
          of a set of ExpRelaxedCategorical distributions. The first
          `N - 1` dimensions index into a batch of independent distributions and
          the last dimension represents a vector of logits for each class. Only
          one of `logits` or `probs` should be passed in.
        probs: An N-D `Tensor`, `N >= 1`, representing the probabilities
          of a set of ExpRelaxedCategorical distributions. The first
          `N - 1` dimensions index into a batch of independent distributions and
          the last dimension represents a vector of probabilities for each
          class. Only one of `logits` or `probs` should be passed in.
        dtype: The type of the event samples (default: int32).
        validate_args: Python `bool`, default `False`. When `True` distribution
          parameters are checked for validity despite possibly degrading runtime
          performance. When `False` invalid inputs may silently render incorrect
          outputs.
        allow_nan_stats: Python `bool`, default `True`. When `True`, statistics
          (e.g., mean, mode, variance) use the value "`NaN`" to indicate the
          result is undefined. When `False`, an exception is raised if one or
          more of the statistic's batch members are undefined.
        name: Python `str` name prefixed to Ops created by this class.
docstring_summary: Initialize ExpRelaxedOneHotCategorical using class log-probabilities.
docstring_tokens: Initialize ExpRelaxedOneHotCategorical using class log - probabilities .
function: def __init__(
        self,
        temperature,
        logits=None,
        probs=None,
        dtype=dtypes.float32,
        validate_args=False,
        allow_nan_stats=True,
        name="ExpRelaxedOneHotCategorical"):
      """Initialize ExpRelaxedOneHotCategorical using class log-probabilities.
  
      Args:
        temperature: An 0-D `Tensor`, representing the temperature
          of a set of ExpRelaxedCategorical distributions. The temperature should
          be positive.
        logits: An N-D `Tensor`, `N >= 1`, representing the log probabilities
          of a set of ExpRelaxedCategorical distributions. The first
          `N - 1` dimensions index into a batch of independent distributions and
          the last dimension represents a vector of logits for each class. Only
          one of `logits` or `probs` should be passed in.
        probs: An N-D `Tensor`, `N >= 1`, representing the probabilities
          of a set of ExpRelaxedCategorical distributions. The first
          `N - 1` dimensions index into a batch of independent distributions and
          the last dimension represents a vector of probabilities for each
          class. Only one of `logits` or `probs` should be passed in.
        dtype: The type of the event samples (default: int32).
        validate_args: Python `bool`, default `False`. When `True` distribution
          parameters are checked for validity despite possibly degrading runtime
          performance. When `False` invalid inputs may silently render incorrect
          outputs.
        allow_nan_stats: Python `bool`, default `True`. When `True`, statistics
          (e.g., mean, mode, variance) use the value "`NaN`" to indicate the
          result is undefined. When `False`, an exception is raised if one or
          more of the statistic's batch members are undefined.
        name: Python `str` name prefixed to Ops created by this class.
      """
      parameters = locals()
      with ops.name_scope(name, values=[logits, probs, temperature]):
        with ops.control_dependencies([check_ops.assert_positive(temperature)]
                                      if validate_args else []):
          self._temperature = array_ops.identity(temperature, name="temperature")
          self._temperature_2d = array_ops.reshape(temperature, [-1, 1],
                                                   name="temperature_2d")
        self._logits, self._probs = distribution_util.get_logits_and_probs(
            name=name, logits=logits, probs=probs, validate_args=validate_args,
            multidimensional=True)
  
        logits_shape_static = self._logits.get_shape().with_rank_at_least(1)
        if logits_shape_static.ndims is not None:
          self._batch_rank = ops.convert_to_tensor(
              logits_shape_static.ndims - 1,
              dtype=dtypes.int32,
              name="batch_rank")
        else:
          with ops.name_scope(name="batch_rank"):
            self._batch_rank = array_ops.rank(self._logits) - 1
  
        with ops.name_scope(name="event_size"):
          self._event_size = array_ops.shape(self._logits)[-1]
  
      super(ExpRelaxedOneHotCategorical, self).__init__(
          dtype=dtype,
          reparameterization_type=distribution.FULLY_REPARAMETERIZED,
          validate_args=validate_args,
          allow_nan_stats=allow_nan_stats,
          parameters=parameters,
          graph_parents=[self._logits,
                         self._probs,
                         self._temperature],
          name=name)
function_tokens: def __init__ ( self , temperature , logits = None , probs = None , dtype = dtypes . float32 , validate_args = False , allow_nan_stats = True , name = "ExpRelaxedOneHotCategorical" ) : parameters = locals ( ) with ops . name_scope ( name , values = [ logits , probs , temperature ] ) : with ops . control_dependencies ( [ check_ops . assert_positive ( temperature ) ] if validate_args else [ ] ) : self . _temperature = array_ops . identity ( temperature , name = "temperature" ) self . _temperature_2d = array_ops . reshape ( temperature , [ - 1 , 1 ] , name = "temperature_2d" ) self . _logits , self . _probs = distribution_util . get_logits_and_probs ( name = name , logits = logits , probs = probs , validate_args = validate_args , multidimensional = True ) logits_shape_static = self . _logits . get_shape ( ) . with_rank_at_least ( 1 ) if logits_shape_static . ndims is not None : self . _batch_rank = ops . convert_to_tensor ( logits_shape_static . ndims - 1 , dtype = dtypes . int32 , name = "batch_rank" ) else : with ops . name_scope ( name = "batch_rank" ) : self . _batch_rank = array_ops . rank ( self . _logits ) - 1 with ops . name_scope ( name = "event_size" ) : self . _event_size = array_ops . shape ( self . _logits ) [ - 1 ] super ( ExpRelaxedOneHotCategorical , self ) . __init__ ( dtype = dtype , reparameterization_type = distribution . FULLY_REPARAMETERIZED , validate_args = validate_args , allow_nan_stats = allow_nan_stats , parameters = parameters , graph_parents = [ self . _logits , self . _probs , self . _temperature ] , name = name )