class_docstr: Dense layer with random `kernel` and `bias`.
  
  This layer uses variational inference to fit a "surrogate" posterior to the
  distribution over both the `kernel` matrix and the `bias` terms which are
  otherwise used in a manner similar to `tf_keras.layers.Dense`.
  
  This layer fits the "weights posterior" according to the following generative
  process:
  
  ```none
  [K, b] ~ Prior()
  M = matmul(X, K) + b
  Y ~ Likelihood(M)
  ```
docstr: Computes the output shape of the layer.
  
  Args:
    input_shape: `TensorShape` or `list` of `TensorShape`
      (only last dim is used)
  Returns:
    The output shape.
  Raises:
      ValueError: If the innermost dimension of `input_shape` is not defined.
docstr_tok: ["Computes","the","output","shape","of","the","layer",".","Args",":","input_shape",":","`","TensorShape","`","or","`","list","`","of","`","TensorShape","`","(","only","last","dim","is","used",")","Returns",":","The","output","shape",".","Raises",":","ValueError",":","If","the","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: `TensorShape` or `list` of `TensorShape`
          (only last dim is used)
      Returns:
        The output shape.
      Raises:
          ValueError: If the innermost dimension of `input_shape` is not defined.
      """
      input_shape = tf.TensorShape(input_shape)
      input_shape = input_shape.with_rank_at_least(2)
      if input_shape[-1] is None:
          raise ValueError(
              f"The innermost dimension of input_shape must be defined, but saw: {input_shape}"
          )
      return input_shape[:-1].concatenate(self.units)
  
file_path: probability/tensorflow_probability/python/layers/dense_variational_v2.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import tf_keras
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