class_docstr: A kernel that supports spectral learning for GPs, where the underlying spectral density is modeled as a mixture
  of delta distributions (e.g., with point masses). This has been explored e.g. in Lazaro-Gredilla et al., 2010.
  
  Conceptually, this kernel is similar to random Fourier features as implemented in RFFKernel, but instead of sampling
  a Gaussian to determine the spectrum sites, they are treated as learnable parameters.
  
  When using CG for inference, this kernel supports linear space and time (in N) for training and inference.
  
  :param int num_dims: Dimensionality of input data that this kernel will operate on. Note that if active_dims is
      used, this should be the length of the active dim set.
  :param int num_deltas: Number of point masses to learn.
code: def __init__(
      self,
      num_dims: int,
      num_deltas: Optional[int] = 128,
      Z_constraint: Optional[Interval] = None,
      batch_shape: Optional[torch.Size] = torch.Size([]),
      **kwargs,
  ):
      Kernel.__init__(
          self, has_lengthscale=True, batch_shape=batch_shape, **kwargs
      )
  
      self.raw_Z = torch.nn.Parameter(
          torch.rand(*batch_shape, num_deltas, num_dims)
      )
  
      if Z_constraint:
          self.register_constraint("raw_Z", Z_constraint)
      else:
          self.register_constraint("raw_Z", Positive())
  
      self.num_dims = num_dims
  
file_path: gpytorch/gpytorch/kernels/spectral_delta_kernel.py
imports: import math
  from typing import Optional
  import torch
  from linear_operator.operators import MatmulLinearOperator, RootLinearOperator
  from ..constraints import Interval, Positive
  from .kernel import Kernel
label_desc: Use image node_id 1 to create a new SpectralDeltaKernel object from inherited base classes: Kernel with example: obj = SpectralDeltaKernel(num_dims, num_deltas, Z_constraint, batch_shape)