class_docstr: Dummy 'proposal' distribution that just returns samples we pass in.
class_docstr_tok: ["Dummy","'proposal","'","distribution","that","just","returns","samples","we","pass","in","."]
docstr: Initializes an empirical distribution with a list of samples.
  
  Args:
    values_with_sample_dim: nested structure of `Tensor`s, each of shape
      prefixed by `[num_samples, B1, ..., Bn]`, where `num_samples` as well as
      `B1, ..., Bn` are batch dimensions shared across all `Tensor`s.
    batch_ndims: optional scalar int `Tensor`, or structure matching
      `values_with_sample_dim` of scalar int `Tensor`s, specifying the number
      of batch dimensions. Used to determine the batch and event shapes of the
      distribution.
      Default value: `0`.
    validate_args: Python `bool` indicating whether to perform runtime checks
      that may have performance cost.
      Default value: `False`.
    name: Python `str` name for ops created by this distribution.
docstr_tok: ["Initializes","an","empirical","distribution","with","a","list","of","samples",".","Args",":","values_with_sample_dim",":","nested","structure","of","`","Tensor","`","s",",","each","of","shape","prefixed","by","`","[","num_samples",",","B1",",","...",",","Bn","]","`",",","where","`","num_samples","`","as","well","as","`","B1",",","...",",","Bn","`","are","batch","dimensions","shared","across","all","`","Tensor","`","s",".","batch_ndims",":","optional","scalar","int","`","Tensor","`",",","or","structure","matching","`","values_with_sample_dim","`","of","scalar","int","`","Tensor","`","s",",","specifying","the","number","of","batch","dimensions",".","Used","to","determine","the","batch","and","event","shapes","of","the","distribution",".","Default","value",":","`","0","`",".","validate_args",":","Python","`","bool","`","indicating","whether","to","perform","runtime","checks","that","may","have","performance","cost",".","Default","value",":","`","False","`",".","name",":","Python","`","str","`","name","for","ops","created","by","this","distribution","."]
code: def __init__(
      self,
      values_with_sample_dim,
      batch_ndims=0,
      validate_args=False,
      name=None,
  ):
      """Initializes an empirical distribution with a list of samples.
  
      Args:
        values_with_sample_dim: nested structure of `Tensor`s, each of shape
          prefixed by `[num_samples, B1, ..., Bn]`, where `num_samples` as well as
          `B1, ..., Bn` are batch dimensions shared across all `Tensor`s.
        batch_ndims: optional scalar int `Tensor`, or structure matching
          `values_with_sample_dim` of scalar int `Tensor`s, specifying the number
          of batch dimensions. Used to determine the batch and event shapes of the
          distribution.
          Default value: `0`.
        validate_args: Python `bool` indicating whether to perform runtime checks
          that may have performance cost.
          Default value: `False`.
        name: Python `str` name for ops created by this distribution.
      """
      parameters = dict(locals())
      with tf.name_scope(name or "DeterministicEmpirical") as name:
          # Ensure we don't break if the passed-in structures are externally
          # mutated.
          values_with_sample_dim = _copy_structure(
              values_with_sample_dim
          )
          batch_ndims = _copy_structure(batch_ndims)
  
          # Prevent tf.Module from wrapping passed-in values, because the
          # wrapper breaks JointDistributionNamed (and maybe other JDs). Instead, we
          # save a separate ref to the input that is used only by tf.Module
          # tracking.
          self._values_for_tracking = values_with_sample_dim
          self._values_with_sample_dim = self._no_dependency(
              values_with_sample_dim
          )
  
          if not tf.nest.is_nested(batch_ndims):
              batch_ndims = tf.nest.map_structure(
                  lambda _: batch_ndims, values_with_sample_dim
              )
          self._batch_ndims = batch_ndims
  
          self._max_num_samples = ps.reduce_min(
              [
                  ps.size0(x)
                  for x in tf.nest.flatten(values_with_sample_dim)
              ]
          )
  
          super(DeterministicEmpirical, self).__init__(
              dtype=tf.nest.map_structure(
                  lambda x: x.dtype, self.values_with_sample_dim
              ),
              reparameterization_type=reparameterization.FULLY_REPARAMETERIZED,
              validate_args=validate_args,
              allow_nan_stats=True,
              name=name,
          )
          self._parameters = self._no_dependency(parameters)
  
imports: import collections
  import contextlib
  import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.mcmc.particle_filter import infer_trajectories
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 1 to create a new DeterministicEmpirical object from inherited base classes: distribution with example: obj = DeterministicEmpirical(values_with_sample_dim, batch_ndims, validate_args, name)