class_docstr: Abstract nD convolution layer (private, used as implementation base).
  
  This layer creates a convolution kernel that is convolved
  (actually cross-correlated) with the layer input to produce a tensor of
  outputs. It may also include a bias addition and activation function
  on the outputs. It assumes the `kernel` and/or `bias` are drawn from
  distributions.
  
  By default, the layer implements a stochastic forward pass via
  sampling from the kernel and bias posteriors,
  ```none
  outputs = f(inputs; kernel, bias), kernel, bias ~ posterior
  ```
  where f denotes the layer's calculation.
  
  The arguments permit separate specification of the surrogate posterior
  (`q(W|x)`), prior (`p(W)`), and divergence for both the `kernel` and `bias`
  distributions.
class_docstr_tok: ["Abstract","nD","convolution","layer","(","private",",","used","as","implementation","base",")",".","This","layer","creates","a","convolution","kernel","that","is","convolved","(","actually","cross-correlated",")","with","the","layer","input","to","produce","a","tensor","of","outputs",".","It","may","also","include","a","bias","addition","and","activation","function","on","the","outputs",".","It","assumes","the","`","kernel","`","and\/or","`","bias","`","are","drawn","from","distributions",".","By","default",",","the","layer","implements","a","stochastic","forward","pass","via","sampling","from","the","kernel","and","bias","posteriors",",","``","`","none","outputs","=","f","(","inputs",";","kernel",",","bias",")",",","kernel",",","bias","~","posterior","``","`","where","f","denotes","the","layer","'s","calculation",".","The","arguments","permit","separate","specification","of","the","surrogate","posterior","(","`","q","(","W|x",")","`",")",",","prior","(","`","p","(","W",")","`",")",",","and","divergence","for","both","the","`","kernel","`","and","`","bias","`","distributions","."]
docstr: Computes the output shape of the layer.
  
  Args:
    input_shape: Shape tuple (tuple of integers) or list of shape tuples
      (one per output tensor of the layer). Shape tuples can include None for
      free dimensions, instead of an integer.
  
  Returns:
    output_shape: A tuple representing the output shape.
docstr_tok: ["Computes","the","output","shape","of","the","layer",".","Args",":","input_shape",":","Shape","tuple","(","tuple","of","integers",")","or","list","of","shape","tuples","(","one","per","output","tensor","of","the","layer",")",".","Shape","tuples","can","include","None","for","free","dimensions",",","instead","of","an","integer",".","Returns",":","output_shape",":","A","tuple","representing","the","output","shape","."]
code: def compute_output_shape(self, input_shape):
      """Computes the output shape of the layer.
  
      Args:
        input_shape: Shape tuple (tuple of integers) or list of shape tuples
          (one per output tensor of the layer). Shape tuples can include None for
          free dimensions, instead of an integer.
  
      Returns:
        output_shape: A tuple representing the output shape.
      """
      input_shape = tf.TensorShape(input_shape).as_list()
      if self.data_format == "channels_last":
          space = input_shape[1:-1]
          new_space = []
          for i in range(len(space)):
              new_dim = conv_output_length(
                  space[i],
                  self.kernel_size[i],
                  padding=self.padding,
                  stride=self.strides[i],
                  dilation=self.dilation_rate[i],
              )
              new_space.append(new_dim)
          return tf.TensorShape(
              [input_shape[0]] + new_space + [self.filters]
          )
      else:
          space = input_shape[2:]
          new_space = []
          for i in range(len(space)):
              new_dim = conv_output_length(
                  space[i],
                  self.kernel_size[i],
                  padding=self.padding,
                  stride=self.strides[i],
                  dilation=self.dilation_rate[i],
              )
              new_space.append(new_dim)
          return tf.TensorShape(
              [input_shape[0], self.filters] + new_space
          )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python import random
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import docstring_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.layers import util
  from tensorflow_probability.python.util.seed_stream import SeedStream
  from tensorflow.python.ops import nn_ops
label_desc: Use image node_id 4 for calling the _ConvVariational obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) and returns: tf, tf