class_docstr: **Operator based on Kullback Leibler Divergence**
  
  This operator constructs Evidence Lower Bound (ELBO) objective
  
  .. math::
  
      ELBO_\beta = \log p(D|\theta) - \beta KL(q||p)
  
  where
  
  .. math::
  
      KL[q(v)||p(v)] = \int q(v)\log\frac{q(v)}{p(v)}dv
  
  
  Parameters
  ----------
  approx: :class:`Approximation`
      Approximation used for inference
  beta: float
      Beta parameter for KL divergence, scales the regularization term.
class_docstr_tok: ["*","*","Operator","based","on","Kullback","Leibler","Divergence","*","*","This","operator","constructs","Evidence","Lower","Bound","(","ELBO",")","objective","..","math",":",":","ELBO_\\beta","=","\\log","p","(","D|\\theta",")","-","\\beta","KL","(","q||p",")","where","..","math",":",":","KL","[","q","(","v",")","||p","(","v",")","]","=","\\int","q","(","v",")","\\log\\frac","{","q","(","v",")","}","{","p","(","v",")","}","dv","Parameters","--","--","--","--","--","approx",":",":","class",":","`","Approximation","`","Approximation","used","for","inference","beta",":","float","Beta","parameter","for","KL","divergence",",","scales","the","regularization","term","."]
code: def apply(self, f):
      return -self.datalogp_norm + self.beta * (
          self.logq_norm - self.varlogp_norm
      )
  
file_path: pymc/pymc/variational/operators.py
imports: from __future__ import annotations
  import pytensor
  from pytensor.graph.basic import Variable
  import pymc
  from pymc.variational import opvi
  from pymc.variational.opvi import NotImplementedInference, ObjectiveFunction, Operator, _known_scan_ignored_inputs
  from pymc.variational.stein import Stein
label_desc: Use image node_id 2 for calling the KL obj's underlying member method code with example usage: obj.apply(f) and returns: unknown