class_docstr: Implementation of Polynomial kernel:
  
      :math:`k(x, z) = \sigma^2(\text{bias} + x \cdot z)^d.`
  
  :param torch.Tensor bias: Bias parameter of this kernel. Should be positive.
  :param int degree: Degree :math:`d` of the polynomial.
code: def __init__(
      self,
      input_dim,
      variance=None,
      bias=None,
      degree=1,
      active_dims=None,
  ):
      super().__init__(input_dim, variance, active_dims)
  
      bias = torch.tensor(1.0) if bias is None else bias
      self.bias = PyroParam(bias, constraints.positive)
  
      if not isinstance(degree, int) or degree < 1:
          raise ValueError(
              "Degree for Polynomial kernel should be a positive integer."
          )
      self.degree = degree
  
file_path: pyro/pyro/contrib/gp/kernels/dot_product.py
imports: import torch
  from torch.distributions import constraints
  from pyro.contrib.gp.kernels.kernel import Kernel
  from pyro.nn.module import PyroParam
label_desc: Use image node_id 1 to create a new Polynomial object from inherited base classes: DotProduct with example: obj = Polynomial(input_dim, variance, bias, degree, active_dims)