class_docstr: A Kernel decorator for kernels with additive structure. If a kernel decomposes
  additively, then this module will be much more computationally efficient.
  
  A kernel function `k` decomposes additively if it can be written as
  
  .. math::
  
     \begin{equation*}
        k(\mathbf{x_1}, \mathbf{x_2}) = k'(x_1^{(1)}, x_2^{(1)}) + \ldots + k'(x_1^{(d)}, x_2^{(d)})
     \end{equation*}
  
  for some kernel :math:`k'` that operates on a subset of dimensions.
  
  Given a `b x n x d` input, `AdditiveStructureKernel` computes `d` one-dimensional kernels
  (using the supplied base_kernel), and then adds the component kernels together.
  Unlike :class:`~gpytorch.kernels.AdditiveKernel`, `AdditiveStructureKernel` computes each
  of the additive terms in batch, making it very fast.
  
  Args:
      base_kernel (Kernel):
          The kernel to approximate with KISS-GP
      num_dims (int):
          The dimension of the input data.
      active_dims (tuple of ints, optional):
          Passed down to the `base_kernel`.
code: def forward(
      self, x1, x2, diag=False, last_dim_is_batch=False, **params
  ):
      if last_dim_is_batch:
          raise RuntimeError(
              "AdditiveStructureKernel does not accept the last_dim_is_batch argument."
          )
  
      res = self.base_kernel(
          x1, x2, diag=diag, last_dim_is_batch=True, **params
      )
      res = res.sum(-2 if diag else -3)
      return res
  
file_path: gpytorch/gpytorch/kernels/additive_structure_kernel.py
imports: from typing import Optional, Tuple
  from .kernel import Kernel
label_desc: Use image node_id 3 for calling the AdditiveStructureKernel obj's underlying member method code with example usage: obj.forward(x1, x2, diag, last_dim_is_batch) and returns: res