class_docstr: Variational flipout linear layer.
code: def __call__(self, x, **kwargs):
      x = tf.convert_to_tensor(x, dtype=self.dtype, name="x")
      self._posterior_value = self.posterior_value_fn(
          self.posterior, seed=self._seed()
      )  # pylint: disable=not-callable
      kernel, bias = self.unpack_weights_fn(
          self.posterior_value
      )  # pylint: disable=not-callable
      y = x
  
      if kernel is not None:
          (
              kernel_dist,
              _,
          ) = self.unpack_weights_fn(  # pylint: disable=not-callable
              self.posterior.sample_distributions(
                  value=self.posterior_value
              )[0]
          )
          kernel_loc, kernel_scale = get_spherical_normal_loc_scale(
              kernel_dist
          )
  
          # batch_size = tf.shape(x)[0]
          # sign_input_shape = ([batch_size] +
          #                     [1] * self._rank +
          #                     [self._input_channels])
          y *= tfp_random.rademacher(
              ps.shape(y), dtype=y.dtype, seed=self._seed()
          )
          kernel_perturb = normal_lib.Normal(
              loc=0.0, scale=kernel_scale
          )
          y = self._apply_kernel_fn(  # E.g., tf.matmul.
              y, kernel_perturb.sample(seed=self._seed())
          )
          y *= tfp_random.rademacher(
              ps.shape(y), dtype=y.dtype, seed=self._seed()
          )
          y += self._apply_kernel_fn(x, kernel_loc)
  
      if bias is not None:
          y = y + bias
  
      if self.activation_fn is not None:
          y = self.activation_fn(y)  # pylint: disable=not-callable
  
      return y
  
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python import random
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.experimental.nn import layers
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 3 for calling the VariationalFlipoutKernelBiasLayer obj's underlying member method code with example usage: obj.__call__(x) and returns: y