class_docstr: Abstract densely-connected class (private, used as implementation base).
  
  This layer implements the Bayesian variational inference analogue to
  a dense layer by assuming the `kernel` and/or the `bias` are drawn
  from distributions. By default, the layer implements a stochastic
  forward pass via sampling from the kernel and bias posteriors,
  
  ```none
  kernel, bias ~ posterior
  outputs = activation(matmul(inputs, kernel) + bias)
  ```
  
  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.
  
  Raises:
    ValueError: If innermost dimension of `input_shape` is not defined.
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",".","Raises",":","ValueError",":","If","innermost","dimension","of","`","input_shape","`","is","not","defined","."]
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.
  
      Raises:
        ValueError: If innermost dimension of `input_shape` is not defined.
      """
      input_shape = tf.TensorShape(input_shape)
      input_shape = input_shape.with_rank_at_least(2)
      if tf.compat.dimension_value(input_shape[-1]) is None:
          raise ValueError(
              "The innermost dimension of `input_shape` must be defined, "
              "but saw: {}".format(input_shape)
          )
      return input_shape[:-1].concatenate(self.units)
  
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 import SeedStream
label_desc: Use image node_id 4 for calling the _DenseVariational obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) and returns: input_shape