class_docstr: Abstract base class for variational inference. Specific
  variational inference methods inherit from `VariationalInference`,
  sharing methods such as a default optimizer.
  
  To build an algorithm inheriting from `VariationalInference`, one
  must at the minimum implement `build_loss_and_gradients`: it
  determines the loss function and gradients to apply for a given
  optimizer.
class_docstr_tok: ["Abstract","base","class","for","variational","inference",".","Specific","variational","inference","methods","inherit","from","`","VariationalInference","`",",","sharing","methods","such","as","a","default","optimizer",".","To","build","an","algorithm","inheriting","from","`","VariationalInference","`",",","one","must","at","the","minimum","implement","`","build_loss_and_gradients","`",":","it","determines","the","loss","function","and","gradients","to","apply","for","a","given","optimizer","."]
docstr: Build loss function and its gradients. They will be leveraged
  in an optimizer to update the model and variational parameters.
  
  Any derived class of `VariationalInference` **must** implement
  this method.
  
  Raises:
    NotImplementedError.
docstr_tok: ["Build","loss","function","and","its","gradients",".","They","will","be","leveraged","in","an","optimizer","to","update","the","model","and","variational","parameters",".","Any","derived","class","of","`","VariationalInference","`","*","*","must","*","*","implement","this","method",".","Raises",":","NotImplementedError","."]
code: def build_loss_and_gradients(self, var_list):
      """Build loss function and its gradients. They will be leveraged
      in an optimizer to update the model and variational parameters.
  
      Any derived class of `VariationalInference` **must** implement
      this method.
  
      Raises:
        NotImplementedError.
      """
      raise NotImplementedError()
  
file_path: edward/edward/inferences/variational_inference.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import numpy
  import six
  import tensorflow
  from edward.inferences.inference import Inference
  from edward.models import RandomVariable
  from edward.util import get_session, get_variables
label_desc: Use image node_id 5 for calling the VariationalInference obj's underlying member method code with example usage: obj.build_loss_and_gradients(var_list) without return types