class_docstr: Creates a new kernel according to
  
      :math:`k_{new}(x, z) = q(k(f(x), f(z))),`
  
  where :math:`f` is an function and :math:`q` is a polynomial with non-negative
  coefficients ``owarping_coef``.
  
  We can take advantage of :math:`f` to combine a Gaussian Process kernel with a deep
  learning architecture. For example:
  
      >>> linear = torch.nn.Linear(10, 3)
      >>> # register its parameters to Pyro's ParamStore and wrap it by lambda
      >>> # to call the primitive pyro.module each time we use the linear function
      >>> pyro_linear_fn = lambda x: pyro.module("linear", linear)(x)
      >>> kernel = gp.kernels.Matern52(input_dim=3, lengthscale=torch.ones(3))
      >>> warped_kernel = gp.kernels.Warping(kernel, pyro_linear_fn)
  
  Reference:
  
  [1] `Deep Kernel Learning`,
  Andrew G. Wilson, Zhiting Hu, Ruslan Salakhutdinov, Eric P. Xing
  
  :param callable iwarping_fn: An input warping function :math:`f`.
  :param list owarping_coef: A list of coefficients of the output warping polynomial.
      These coefficients must be non-negative.
code: def __init__(self, kern, iwarping_fn=None, owarping_coef=None):
      super().__init__(kern)
  
      self.iwarping_fn = iwarping_fn
  
      if owarping_coef is not None:
          for coef in owarping_coef:
              if not isinstance(coef, int) and coef < 0:
                  raise ValueError(
                      "Coefficients of the polynomial must be a "
                      "non-negative integer."
                  )
          if len(owarping_coef) < 2 and sum(owarping_coef) == 0:
              raise ValueError(
                  "The ouput warping polynomial should have a degree "
                  "of at least 1."
              )
      self.owarping_coef = owarping_coef
  
imports: import numbers
  from pyro.contrib.gp.parameterized import Parameterized
label_desc: Use image node_id 1 to create a new Warping object from inherited base classes: Transforming with example: obj = Warping(kern, iwarping_fn, owarping_coef)