class_docstr: Describes a tfp.distribution.Distribution using nested parameters.
class_docstr_tok: ["Describes","a","tfp.distribution.Distribution","using","nested","parameters","."]
docstr: Construct a `DistributionSpecV2` from a Distribution's properties.
  
  Note that the `parameters` used to create the spec should contain
  `tf.TypeSpec` objects instead of tensors.  We check for this.
  
  Args:
    event_shape: The distribution's `event_shape`.  This is the shape that
      `distribution.sample()` returns.  `distribution.sample(sample_shape)`
      returns tensors of shape `sample_shape + event_shape`.
    dtype: The distribution's `dtype`.
    parameters: The recursive parameters of the distribution, with tensors
      having directly been converted to `tf.TypeSpec` objects.
  
  Raises:
    TypeError: If for any entry `x` in `parameters`: `tf.is_tensor(x)`.
docstr_tok: ["Construct","a","`","DistributionSpecV2","`","from","a","Distribution","'s","properties",".","Note","that","the","`","parameters","`","used","to","create","the","spec","should","contain","`","tf.TypeSpec","`","objects","instead","of","tensors",".","We","check","for","this",".","Args",":","event_shape",":","The","distribution","'s","`","event_shape","`",".","This","is","the","shape","that","`","distribution.sample","(",")","`","returns",".","`","distribution.sample","(","sample_shape",")","`","returns","tensors","of","shape","`","sample_shape","+","event_shape","`",".","dtype",":","The","distribution","'s","`","dtype","`",".","parameters",":","The","recursive","parameters","of","the","distribution",",","with","tensors","having","directly","been","converted","to","`","tf.TypeSpec","`","objects",".","Raises",":","TypeError",":","If","for","any","entry","`","x","`","in","`","parameters","`",":","`","tf.is_tensor","(","x",")","`","."]
code: def __init__(
      self,
      event_shape: tf.TensorShape,
      dtype: tf.DType,
      parameters: Params,
  ):
      """Construct a `DistributionSpecV2` from a Distribution's properties.
  
      Note that the `parameters` used to create the spec should contain
      `tf.TypeSpec` objects instead of tensors.  We check for this.
  
      Args:
        event_shape: The distribution's `event_shape`.  This is the shape that
          `distribution.sample()` returns.  `distribution.sample(sample_shape)`
          returns tensors of shape `sample_shape + event_shape`.
        dtype: The distribution's `dtype`.
        parameters: The recursive parameters of the distribution, with tensors
          having directly been converted to `tf.TypeSpec` objects.
  
      Raises:
        TypeError: If for any entry `x` in `parameters`: `tf.is_tensor(x)`.
      """
      _check_no_tensors(parameters)
      self._event_shape = event_shape
      self._dtype = dtype
      self._parameters = parameters
      self._event_spec = tf.TensorSpec(shape=event_shape, dtype=dtype)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  from typing import Any, Mapping, Text, Type
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.distributions import tanh_bijector_stable
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 to create a new DistributionSpecV2 object from inherited base classes: object with example: obj = DistributionSpecV2(event_shape, dtype, parameters)