code: def test_metropolis_hastings(self):
      with self.test_session():
          (
              N,
              D,
              W_1,
              W_2,
              W_3,
              b_1,
              b_2,
              X,
              y,
              X_train,
              y_train,
          ) = self._test()
  
          T = 1  # number of MCMC samples
          qW_1 = Empirical(
              params=tf.Variable(tf.random_normal([T, D, 20]))
          )
          qW_2 = Empirical(
              params=tf.Variable(tf.random_normal([T, 20, 15]))
          )
          qW_3 = Empirical(
              params=tf.Variable(tf.random_normal([T, 15, 1]))
          )
          qb_1 = Empirical(
              params=tf.Variable(tf.random_normal([T, 20]))
          )
          qb_2 = Empirical(
              params=tf.Variable(tf.random_normal([T, 15]))
          )
  
          inference = ed.MetropolisHastings(
              {W_1: qW_1, b_1: qb_1, W_2: qW_2, b_2: qb_2, W_3: qW_3},
              {W_1: W_1, b_1: b_1, W_2: W_2, b_2: b_2, W_3: W_3},
              data={y: y_train, X: X_train},
          )
          inference.run()
  
file_path: edward/tests/inferences/bayesian_nn_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import tensorflow
  from edward.models import Empirical, Bernoulli, Normal
label_desc: Use image node_id 5 for calling the test_inference_bayesian_nn_class obj's underlying member method code with example usage: obj.test_metropolis_hastings() without return types