class_docstr: Distribution over convolutions.
  
  By default, the distribution is effected by placing isotropic Gaussian prior
  over the `kernel`.
  
  #### Example
  
  ```python
  layer_dist = Conv2D(in_channels=5, out_channels=10, size=5)
  layer = layer_dist.sample(seed=tfp.random.sanitize_seed(0))
  y = layer(x)
  ```
class_docstr_tok: ["Distribution","over","convolutions",".","By","default",",","the","distribution","is","effected","by","placing","isotropic","Gaussian","prior","over","the","`","kernel","`",".","#","#","#","#","Example","``","`","python","layer_dist","=","Conv2D","(","in_channels=5",",","out_channels=10",",","size=5",")","layer","=","layer_dist.sample","(","seed=tfp.random.sanitize_seed","(","0",")",")","y","=","layer","(","x",")","``","`"]
docstr: Initialize the `Conv2D` distribution.
  
  Args:
    out_channels: Integer Tensor. Number of output channels.
    size: Integer Tensor or a pair of integer-Tensors. Spatial extent of the
      kernel. If a single value is provided, it is used for both width and
      height.
    in_channels: Integer Tensor. Number of input channels.
    dtype: Dtype to use for the inner distribution.
    params_model_fn: Callable with signature `(out_channels, size,
      in_channels, dtype) -> model_fn`. A model functions (in the
      `JointDistributionCoroutine` sense) used to define the `kernel` random
      variable.
    strides: A 2-tuple of positive integers. Strides for the spatial
      dimensions.
    padding: A Python string. Can be either 'SAME' or 'VALID'.
    name: Name to use for the ops defined by this distribution.
docstr_tok: ["Initialize","the","`","Conv2D","`","distribution",".","Args",":","out_channels",":","Integer","Tensor",".","Number","of","output","channels",".","size",":","Integer","Tensor","or","a","pair","of","integer-Tensors",".","Spatial","extent","of","the","kernel",".","If","a","single","value","is","provided",",","it","is","used","for","both","width","and","height",".","in_channels",":","Integer","Tensor",".","Number","of","input","channels",".","dtype",":","Dtype","to","use","for","the","inner","distribution",".","params_model_fn",":","Callable","with","signature","`","(","out_channels",",","size",",","in_channels",",","dtype",")","-",">","model_fn","`",".","A","model","functions","(","in","the","`","JointDistributionCoroutine","`","sense",")","used","to","define","the","`","kernel","`","random","variable",".","strides",":","A","2-tuple","of","positive","integers",".","Strides","for","the","spatial","dimensions",".","padding",":","A","Python","string",".","Can","be","either","'SAME","'","or","'VALID","'",".","name",":","Name","to","use","for","the","ops","defined","by","this","distribution","."]
code: def __init__(
      self,
      out_channels,
      size,
      in_channels,
      dtype=tf.float32,
      params_model_fn=_conv2d_normal_params_model_fn,
      strides=(1, 1),
      padding="SAME",
      name="Conv2D",
  ):
      """Initialize the `Conv2D` distribution.
  
      Args:
        out_channels: Integer Tensor. Number of output channels.
        size: Integer Tensor or a pair of integer-Tensors. Spatial extent of the
          kernel. If a single value is provided, it is used for both width and
          height.
        in_channels: Integer Tensor. Number of input channels.
        dtype: Dtype to use for the inner distribution.
        params_model_fn: Callable with signature `(out_channels, size,
          in_channels, dtype) -> model_fn`. A model functions (in the
          `JointDistributionCoroutine` sense) used to define the `kernel` random
          variable.
        strides: A 2-tuple of positive integers. Strides for the spatial
          dimensions.
        padding: A Python string. Can be either 'SAME' or 'VALID'.
        name: Name to use for the ops defined by this distribution.
      """
      parameters = dict(locals())
      if not isinstance(size, collections.abc.Sequence):
          size = (size, size)
      elif len(size) != 2:
          raise ValueError(
              "`size` must be a single integer or a 2-tuple of integers. "
              f"Saw: {size}."
          )
  
      model = functools.partial(
          params_model_fn, out_channels, size, in_channels, dtype
      )
  
      super().__init__(
          model,
          name=name,
          sample_dtype=make_conv2d_layer_class(
              strides=tuple(strides),
              padding=padding,
          )(kernel=None),
      )
      self._parameters = parameters
  
imports: import collections
  import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import deterministic
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.internal import vectorization_util
label_desc: Use image node_id 1 to create a new Conv2D object from inherited base classes: joint_distribution_coroutine with example: obj = Conv2D(out_channels, size, in_channels, dtype, params_model_fn, strides, padding, name)