class_docstr: Adversarially Learned Inference [@dumuolin2017adversarially] or
  Bidirectional Generative Adversarial Networks [@donahue2017adversarial]
  for joint learning of generator and inference networks.
  
  Works for the class of implicit (and differentiable) probabilistic
  models. These models do not require a tractable density and assume
  only a program that generates samples.
  
  #### Notes
  
  `BiGANInference` matches a mapping from data to latent variables and a
  mapping from latent variables to data through a joint
  discriminator.
  
  In building the computation graph for inference, the
  discriminator's parameters can be accessed with the variable scope
  "Disc".
  In building the computation graph for inference, the
  encoder and decoder parameters can be accessed with the variable scope
  "Gen".
  
  The objective function also adds to itself a summation over all tensors
  in the `REGULARIZATION_LOSSES` collection.
  
  #### Examples
  
  ```python
  with tf.variable_scope("Gen"):
    xf = gen_data(z_ph)
    zf = gen_latent(x_ph)
  inference = ed.BiGANInference({z_ph: zf}, {xf: x_ph}, discriminator)
  ```
class_docstr_tok: ["Adversarially","Learned","Inference","[","@","dumuolin2017adversarially","]","or","Bidirectional","Generative","Adversarial","Networks","[","@","donahue2017adversarial","]","for","joint","learning","of","generator","and","inference","networks",".","Works","for","the","class","of","implicit","(","and","differentiable",")","probabilistic","models",".","These","models","do","not","require","a","tractable","density","and","assume","only","a","program","that","generates","samples",".","#","#","#","#","Notes","`","BiGANInference","`","matches","a","mapping","from","data","to","latent","variables","and","a","mapping","from","latent","variables","to","data","through","a","joint","discriminator",".","In","building","the","computation","graph","for","inference",",","the","discriminator","'s","parameters","can","be","accessed","with","the","variable","scope","''","Disc","''",".","In","building","the","computation","graph","for","inference",",","the","encoder","and","decoder","parameters","can","be","accessed","with","the","variable","scope","''","Gen","''",".","The","objective","function","also","adds","to","itself","a","summation","over","all","tensors","in","the","`","REGULARIZATION_LOSSES","`","collection",".","#","#","#","#","Examples","``","`","python","with","tf.variable_scope","(","``","Gen","''",")",":","xf","=","gen_data","(","z_ph",")","zf","=","gen_latent","(","x_ph",")","inference","=","ed.BiGANInference","(","{","z_ph",":","zf","}",",","{","xf",":","x_ph","}",",","discriminator",")","``","`"]
code: def __init__(self, latent_vars, data, discriminator):
      if not callable(discriminator):
          raise TypeError("discriminator must be a callable function.")
  
      self.discriminator = discriminator
      # call grandparent's method; avoid parent (GANInference)
      super(GANInference, self).__init__(latent_vars, data)
  
file_path: edward/edward/inferences/bigan_inference.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import tensorflow
  from edward.inferences.gan_inference import GANInference
  from edward.util import get_session
label_desc: Use image node_id 1 to create a new BiGANInference object from inherited base classes: GANInference with example: obj = BiGANInference(latent_vars, data, discriminator)