class_docstr: This is a generalization of a categorical distribution.
  
  The support for the DiscreteValued distribution can be any real valued range,
  whereas the categorical distribution has support [0, n_categories - 1] or
  [1, n_categories]. This generalization allows us to take the mean of the
  distribution over its support.
class_docstr_tok: ["This","is","a","generalization","of","a","categorical","distribution",".","The","support","for","the","DiscreteValued","distribution","can","be","any","real","valued","range",",","whereas","the","categorical","distribution","has","support","[","0",",","n_categories","-","1","]","or","[","1",",","n_categories","]",".","This","generalization","allows","us","to","take","the","mean","of","the","distribution","over","its","support","."]
docstr: Initialization.
  
  Args:
    values: Values making up support of the distribution. Should have a shape
      compatible with logits.
    logits: An N-D Tensor, N >= 1, representing the log probabilities of a set
      of Categorical distributions. The first N - 1 dimensions index into a
      batch of independent distributions and the last dimension indexes into
      the classes.
    probs: An N-D Tensor, N >= 1, representing the probabilities of a set of
      Categorical 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.
    name: Name of the distribution object.
docstr_tok: ["Initialization",".","Args",":","values",":","Values","making","up","support","of","the","distribution",".","Should","have","a","shape","compatible","with","logits",".","logits",":","An","N-D","Tensor",",","N",">","=","1",",","representing","the","log","probabilities","of","a","set","of","Categorical","distributions",".","The","first","N","-","1","dimensions","index","into","a","batch","of","independent","distributions","and","the","last","dimension","indexes","into","the","classes",".","probs",":","An","N-D","Tensor",",","N",">","=","1",",","representing","the","probabilities","of","a","set","of","Categorical","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",".","name",":","Name","of","the","distribution","object","."]
code: def __init__(
      self,
      values: chex.Array,
      logits: Optional[chex.Array] = None,
      probs: Optional[chex.Array] = None,
      name: str = "DiscreteValuedDistribution",
  ):
      """Initialization.
  
      Args:
        values: Values making up support of the distribution. Should have a shape
          compatible with logits.
        logits: An N-D Tensor, N >= 1, representing the log probabilities of a set
          of Categorical distributions. The first N - 1 dimensions index into a
          batch of independent distributions and the last dimension indexes into
          the classes.
        probs: An N-D Tensor, N >= 1, representing the probabilities of a set of
          Categorical 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.
        name: Name of the distribution object.
      """
      parameters = dict(locals())
      self._values = np.asarray(values)
  
      if logits is not None:
          logits = jnp.asarray(logits)
          chex.assert_shape(logits, (..., *self._values.shape))
  
      if probs is not None:
          probs = jnp.asarray(probs)
          chex.assert_shape(probs, (..., *self._values.shape))
  
      super().__init__(logits=logits, probs=probs, name=name)
  
      self._parameters = parameters
  
imports: from typing import Any, List, Optional, Sequence, Union, Callable
  import chex
  import haiku
  import jax
  import jax.numpy
  import numpy
  import tensorflow_probability
  import tensorflow_probability.substrates.jax
label_desc: Use image node_id 1 to create a new DiscreteValuedTfpDistribution object from inherited base classes: tfd with example: obj = DiscreteValuedTfpDistribution(values, logits, probs, name)