class_docstr: Gibbs sampling [@geman1984stochastic].
  
  Note `Gibbs` assumes the proposal distribution has the same
  support as the prior. The `auto_transform` attribute in
  the method `initialize()` is not applicable.
  
  #### Examples
  
  ```python
  x_data = np.array([0, 1, 0, 0, 0, 0, 0, 0, 0, 1])
  
  p = Beta(1.0, 1.0)
  x = Bernoulli(probs=p, sample_shape=10)
  
  qp = Empirical(tf.Variable(tf.zeros(500)))
  inference = ed.Gibbs({p: qp}, data={x: x_data})
  ```
class_docstr_tok: ["Gibbs","sampling","[","@","geman1984stochastic","]",".","Note","`","Gibbs","`","assumes","the","proposal","distribution","has","the","same","support","as","the","prior",".","The","`","auto_transform","`","attribute","in","the","method","`","initialize","(",")","`","is","not","applicable",".","#","#","#","#","Examples","``","`","python","x_data","=","np.array","(","[","0",",","1",",","0",",","0",",","0",",","0",",","0",",","0",",","0",",","1","]",")","p","=","Beta","(","1.0",",","1.0",")","x","=","Bernoulli","(","probs=p",",","sample_shape=10",")","qp","=","Empirical","(","tf.Variable","(","tf.zeros","(","500",")",")",")","inference","=","ed.Gibbs","(","{","p",":","qp","}",",","data=","{","x",":","x_data","}",")","``","`"]
docstr: Initialize inference algorithm. It initializes hyperparameters
  and builds ops for the algorithm's computation graph.
  
  Args:
    scan_order: list or str.
      The scan order for each Gibbs update. If list, it is the
      deterministic order of latent variables. An element in the list
      can be a `RandomVariable` or itself a list of
      `RandomVariable`s (this defines a blocked Gibbs sampler). If
      'random', will use a random order at each update.
docstr_tok: ["Initialize","inference","algorithm",".","It","initializes","hyperparameters","and","builds","ops","for","the","algorithm","'s","computation","graph",".","Args",":","scan_order",":","list","or","str",".","The","scan","order","for","each","Gibbs","update",".","If","list",",","it","is","the","deterministic","order","of","latent","variables",".","An","element","in","the","list","can","be","a","`","RandomVariable","`","or","itself","a","list","of","`","RandomVariable","`","s","(","this","defines","a","blocked","Gibbs","sampler",")",".","If","'random","'",",","will","use","a","random","order","at","each","update","."]
code: def initialize(self, scan_order="random", *args, **kwargs):
      """Initialize inference algorithm. It initializes hyperparameters
      and builds ops for the algorithm's computation graph.
  
      Args:
        scan_order: list or str.
          The scan order for each Gibbs update. If list, it is the
          deterministic order of latent variables. An element in the list
          can be a `RandomVariable` or itself a list of
          `RandomVariable`s (this defines a blocked Gibbs sampler). If
          'random', will use a random order at each update.
      """
      self.scan_order = scan_order
      self.feed_dict = {}
      kwargs["auto_transform"] = False
      return super(Gibbs, self).initialize(*args, **kwargs)
  
file_path: edward/edward/inferences/gibbs.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import random
  import six
  import tensorflow
  from collections import OrderedDict
  from edward.inferences.conjugacy import complete_conditional
  from edward.inferences.monte_carlo import MonteCarlo
  from edward.models import RandomVariable
  from edward.util import check_latent_vars, get_session
label_desc: Use image node_id 2 for calling the Gibbs obj's underlying member method code with example usage: obj.initialize(scan_order) and returns: super