code: def main(_):
      ed.set_seed(42)
  
      # DATA
      x_data = np.array([0, 1, 0, 0, 0, 0, 0, 0, 0, 1])
  
      # MODEL
      p = Beta(1.0, 1.0)
      x = Bernoulli(probs=p, sample_shape=10)
  
      # COMPLETE CONDITIONAL
      p_cond = ed.complete_conditional(p)
  
      sess = ed.get_session()
  
      print("p(probs | x) type:", p_cond.parameters["name"])
      param_vals = sess.run(
          {
              key: val
              for key, val in six.iteritems(p_cond.parameters)
              if isinstance(val, tf.Tensor)
          },
          {x: x_data},
      )
      print("parameters:")
      for key, val in six.iteritems(param_vals):
          print("%s:\t%.3f" % (key, val))
  
file_path: edward/examples/beta_bernoulli_conjugate.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import six
  import tensorflow
  from edward.models import Bernoulli, Beta
label_desc: Use image node_id 1 for calling a global function with example usage: main(_) without return types