class_docstr: Logarithm function with exponentially weighted moving average
  for gradients.
  
  For input `inputs` this function return :code:`inputs.log()`. However, it
  computes the gradient as
  
      :math:`\frac{\sum_{t=0}^{T-1} \alpha^t}{\sum_{t=0}^{T-1} \alpha^t x_{T-t}}`
  
  where :math:`x_t` are historical input values passed to this function,
  :math:`x_T` being the most recently seen value.
  
  This gradient may help with numerical stability when the sequence of
  inputs to the function form a convergent sequence.
class_docstr_tok: ["Logarithm","function","with","exponentially","weighted","moving","average","for","gradients",".","For","input","`","inputs","`","this","function","return",":","code",":","`","inputs.log","(",")","`",".","However",",","it","computes","the","gradient","as",":","math",":","`","\\frac","{","\\sum_","{","t=0","}","^","{","T-1","}","\\alpha^t","}","{","\\sum_","{","t=0","}","^","{","T-1","}","\\alpha^t","x_","{","T-t","}","}","`","where",":","math",":","`","x_t","`","are","historical","input","values","passed","to","this","function",",",":","math",":","`","x_T","`","being","the","most","recently","seen","value",".","This","gradient","may","help","with","numerical","stability","when","the","sequence","of","inputs","to","the","function","form","a","convergent","sequence","."]
code: def __init__(self, alpha):
      self.alpha = alpha
      self.ewma = 0.0
      self.n = 0
      self.s = 0.0
  
imports: import math
  import warnings
  import torch
  import pyro
  from pyro import poutine
  from pyro.contrib.oed.search import Search
  from pyro.contrib.util import lexpand
  from pyro.infer import SVI, EmpiricalMarginal, Importance
  from pyro.infer.autoguide.utils import mean_field_entropy
  from pyro.util import torch_isinf, torch_isnan
label_desc: Use image node_id 1 to create a new EwmaLog object  with example: obj = EwmaLog(alpha)