Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfp.experimental.nn.util.make_kernel_bias_posterior_mvn_diag

View source on GitHub

Create learnable posterior for Variational layers with kernel and bias.

tfp.experimental.nn.util.make_kernel_bias_posterior_mvn_diag(
    kernel_shape, bias_shape, kernel_initializer=None, bias_initializer=None,
    kernel_batch_ndims=0, bias_batch_ndims=0, dtype=tf.float32,
    kernel_name='posterior_kernel', bias_name='posterior_bias'
)

Args:

  • kernel_shape: ...
  • bias_shape: ...
  • kernel_initializer: ... Default value: None (i.e., tf.initializers.glorot_uniform()).
  • bias_initializer: ... Default value: None (i.e., tf.zeros).
  • kernel_batch_ndims: ... Default value: 0.
  • bias_batch_ndims: ... Default value: 0.
  • dtype: ... Default value: tf.float32.
  • kernel_name: ... Default value: "posterior_kernel".
  • bias_name: ... Default value: "posterior_bias".

Returns:

  • kernel_and_bias_distribution: ...