class_docstr: Hamiltonian Monte Carlo, also known as hybrid Monte Carlo
  [@duane1987hybrid; @neal2011mcmc].
  
  #### Notes
  
  In conditional inference, we infer $z$ in $p(z, \beta
  \mid x)$ while fixing inference over $\beta$ using another
  distribution $q(\beta)$.
  `HMC` substitutes the model's log marginal density
  
  $\log p(x, z) = \log \mathbb{E}_{q(\beta)} [ p(x, z, \beta) ]
                \approx \log p(x, z, \beta^*)$
  
  leveraging a single Monte Carlo sample, where $\beta^* \sim
  q(\beta)$. This is unbiased (and therefore asymptotically exact as a
  pseudo-marginal method) if $q(\beta) = p(\beta \mid x)$.
  
  #### Examples
  
  ```python
  mu = Normal(loc=0.0, scale=1.0)
  x = Normal(loc=mu, scale=1.0, sample_shape=10)
  
  qmu = Empirical(tf.Variable(tf.zeros(500)))
  inference = ed.HMC({mu: qmu}, {x: np.zeros(10, dtype=np.float32)})
  ```
class_docstr_tok: ["Hamiltonian","Monte","Carlo",",","also","known","as","hybrid","Monte","Carlo","[","@","duane1987hybrid",";","@","neal2011mcmc","]",".","#","#","#","#","Notes","In","conditional","inference",",","we","infer","$","z","$","in","$","p","(","z",",","\\beta","\\mid","x",")","$","while","fixing","inference","over","$","\\beta","$","using","another","distribution","$","q","(","\\beta",")","$",".","`","HMC","`","substitutes","the","model","'s","log","marginal","density","$","\\log","p","(","x",",","z",")","=","\\log","\\mathbb","{","E","}","_","{","q","(","\\beta",")","}","[","p","(","x",",","z",",","\\beta",")","]","\\approx","\\log","p","(","x",",","z",",","\\beta^","*",")","$","leveraging","a","single","Monte","Carlo","sample",",","where","$","\\beta^","*","\\sim","q","(","\\beta",")","$",".","This","is","unbiased","(","and","therefore","asymptotically","exact","as","a","pseudo-marginal","method",")","if","$","q","(","\\beta",")","=","p","(","\\beta","\\mid","x",")","$",".","#","#","#","#","Examples","``","`","python","mu","=","Normal","(","loc=0.0",",","scale=1.0",")","x","=","Normal","(","loc=mu",",","scale=1.0",",","sample_shape=10",")","qmu","=","Empirical","(","tf.Variable","(","tf.zeros","(","500",")",")",")","inference","=","ed.HMC","(","{","mu",":","qmu","}",",","{","x",":","np.zeros","(","10",",","dtype=np.float32",")","}",")","``","`"]
docstr: Initialize inference algorithm. It initializes hyperparameters
  and builds ops for the algorithm's computation graph.
  
  Args:
    step_size: float.
      Step size of numerical integrator.
    n_steps: int.
      Number of steps of numerical integrator.
docstr_tok: ["Initialize","inference","algorithm",".","It","initializes","hyperparameters","and","builds","ops","for","the","algorithm","'s","computation","graph",".","Args",":","step_size",":","float",".","Step","size","of","numerical","integrator",".","n_steps",":","int",".","Number","of","steps","of","numerical","integrator","."]
code: def initialize(self, step_size=0.25, n_steps=2, *args, **kwargs):
      """Initialize inference algorithm. It initializes hyperparameters
      and builds ops for the algorithm's computation graph.
  
      Args:
        step_size: float.
          Step size of numerical integrator.
        n_steps: int.
          Number of steps of numerical integrator.
      """
      self.step_size = step_size
      self.n_steps = n_steps
      # store global scope for log joint calculations
      self._scope = (
          tf.get_default_graph().unique_name("inference") + "/"
      )
      return super(HMC, self).initialize(*args, **kwargs)
  
file_path: edward/edward/inferences/hmc.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import tensorflow
  from collections import OrderedDict
  from edward.inferences.monte_carlo import MonteCarlo
  from edward.models import RandomVariable
  from edward.util import copy
label_desc: Use image node_id 2 for calling the HMC obj's underlying member method code with example usage: obj.initialize(step_size, n_steps) and returns: super