class_docstr: Abstract base class for inference. All inference algorithms in
  Edward inherit from `Inference`, sharing common methods and
  properties via a class hierarchy.
  
  Specific algorithms typically inherit from other subclasses of
  `Inference` rather than `Inference` directly. For example, one
  might inherit from the abstract classes `MonteCarlo` or
  `VariationalInference`.
  
  To build an algorithm inheriting from `Inference`, one must at the
  minimum implement `initialize` and `update`: the former builds
  the computational graph for the algorithm; the latter runs the
  computational graph for the algorithm.
  
  To reset inference (e.g., internal variable counters incremented
  over training), fetch inference's reset ops from session with
  `sess.run(inference.reset)`.
  
  #### Examples
  
  ```python
  # Set up probability model.
  mu = Normal(loc=0.0, scale=1.0)
  x = Normal(loc=mu, scale=1.0, sample_shape=50)
  
  # Set up posterior approximation.
  qmu_loc = tf.Variable(tf.random_normal([]))
  qmu_scale = tf.nn.softplus(tf.Variable(tf.random_normal([])))
  qmu = Normal(loc=qmu_loc, scale=qmu_scale)
  
  inference = ed.Inference({mu: qmu}, data={x: tf.zeros(50)})
  ```
class_docstr_tok: ["Abstract","base","class","for","inference",".","All","inference","algorithms","in","Edward","inherit","from","`","Inference","`",",","sharing","common","methods","and","properties","via","a","class","hierarchy",".","Specific","algorithms","typically","inherit","from","other","subclasses","of","`","Inference","`","rather","than","`","Inference","`","directly",".","For","example",",","one","might","inherit","from","the","abstract","classes","`","MonteCarlo","`","or","`","VariationalInference","`",".","To","build","an","algorithm","inheriting","from","`","Inference","`",",","one","must","at","the","minimum","implement","`","initialize","`","and","`","update","`",":","the","former","builds","the","computational","graph","for","the","algorithm",";","the","latter","runs","the","computational","graph","for","the","algorithm",".","To","reset","inference","(","e.g.",",","internal","variable","counters","incremented","over","training",")",",","fetch","inference","'s","reset","ops","from","session","with","`","sess.run","(","inference.reset",")","`",".","#","#","#","#","Examples","``","`","python","#","Set","up","probability","model",".","mu","=","Normal","(","loc=0.0",",","scale=1.0",")","x","=","Normal","(","loc=mu",",","scale=1.0",",","sample_shape=50",")","#","Set","up","posterior","approximation",".","qmu_loc","=","tf.Variable","(","tf.random_normal","(","[","]",")",")","qmu_scale","=","tf.nn.softplus","(","tf.Variable","(","tf.random_normal","(","[","]",")",")",")","qmu","=","Normal","(","loc=qmu_loc",",","scale=qmu_scale",")","inference","=","ed.Inference","(","{","mu",":","qmu","}",",","data=","{","x",":","tf.zeros","(","50",")","}",")","``","`"]
docstr: Run one iteration of inference.
  
  Any derived class of `Inference` **must** implement this method.
  
  Args:
    feed_dict: dict.
      Feed dictionary for a TensorFlow session run. It is used to feed
      placeholders that are not fed during initialization.
  
  Returns:
    dict.
      Dictionary of algorithm-specific information.
docstr_tok: ["Run","one","iteration","of","inference",".","Any","derived","class","of","`","Inference","`","*","*","must","*","*","implement","this","method",".","Args",":","feed_dict",":","dict",".","Feed","dictionary","for","a","TensorFlow","session","run",".","It","is","used","to","feed","placeholders","that","are","not","fed","during","initialization",".","Returns",":","dict",".","Dictionary","of","algorithm-specific","information","."]
code: def update(self, feed_dict=None):
      """Run one iteration of inference.
  
      Any derived class of `Inference` **must** implement this method.
  
      Args:
        feed_dict: dict.
          Feed dictionary for a TensorFlow session run. It is used to feed
          placeholders that are not fed during initialization.
  
      Returns:
        dict.
          Dictionary of algorithm-specific information.
      """
      if feed_dict is None:
          feed_dict = {}
  
      for key, value in six.iteritems(self.data):
          if (
              isinstance(key, tf.Tensor)
              and "Placeholder" in key.op.type
          ):
              feed_dict[key] = value
  
      sess = get_session()
      t = sess.run(self.increment_t)
  
      if self.debug:
          sess.run(self.op_check, feed_dict)
  
      if self.logging and self.n_print != 0:
          if t == 1 or t % self.n_print == 0:
              summary = sess.run(self.summarize, feed_dict)
              self.train_writer.add_summary(summary, t)
  
      return {"t": t}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import numpy
  import six
  import tensorflow
  import os
  from datetime import datetime
  from edward.models import RandomVariable
  from edward.util import check_data, check_latent_vars, get_session, get_variables, Progbar, transform
  from tensorflow.contrib.distributions import bijectors
label_desc: Use image node_id 4 for calling the Inference obj's underlying member method code with example usage: obj.update(feed_dict) and returns: dict