class_docstr: If the input data :math:`X` are regularly spaced on a grid, then
  `GridKernel` can dramatically speed up computatations for stationary kernel.
  
  GridKernel exploits Toeplitz and Kronecker structure within the covariance matrix.
  See `Fast kernel learning for multidimensional pattern extrapolation`_ for more info.
  
  .. note::
  
      `GridKernel` can only wrap **stationary kernels** (such as RBF, Matern,
      Periodic, Spectral Mixture, etc.)
  
  Args:
      base_kernel (Kernel):
          The kernel to speed up with grid methods.
      grid (Tensor):
          A g x d tensor where column i consists of the projections of the
          grid in dimension i.
      active_dims (tuple of ints, optional):
          Passed down to the `base_kernel`.
      interpolation_mode (bool):
          Used for GridInterpolationKernel where we want the covariance
          between points in the projections of the grid of each dimension.
          We do this by treating `grid` as d batches of g x 1 tensors by
          calling base_kernel(grid, grid) with last_dim_is_batch to get a d x g x g Tensor
          which we Kronecker product to get a g x g KroneckerProductLinearOperator.
  
  .. _Fast kernel learning for multidimensional pattern extrapolation:
      http://www.cs.cmu.edu/~andrewgw/manet.pdf
class_docstr_tok: ["If","the","input","data",":","math",":","`","X","`","are","regularly","spaced","on","a","grid",",","then","`","GridKernel","`","can","dramatically","speed","up","computatations","for","stationary","kernel",".","GridKernel","exploits","Toeplitz","and","Kronecker","structure","within","the","covariance","matrix",".","See","`","Fast","kernel","learning","for","multidimensional","pattern","extrapolation","`","_","for","more","info",".","..","note",":",":","`","GridKernel","`","can","only","wrap","*","*","stationary","kernels","*","*","(","such","as","RBF",",","Matern",",","Periodic",",","Spectral","Mixture",",","etc",".",")","Args",":","base_kernel","(","Kernel",")",":","The","kernel","to","speed","up","with","grid","methods",".","grid","(","Tensor",")",":","A","g","x","d","tensor","where","column","i","consists","of","the","projections","of","the","grid","in","dimension","i.","active_dims","(","tuple","of","ints",",","optional",")",":","Passed","down","to","the","`","base_kernel","`",".","interpolation_mode","(","bool",")",":","Used","for","GridInterpolationKernel","where","we","want","the","covariance","between","points","in","the","projections","of","the","grid","of","each","dimension",".","We","do","this","by","treating","`","grid","`","as","d","batches","of","g","x","1","tensors","by","calling","base_kernel","(","grid",",","grid",")","with","last_dim_is_batch","to","get","a","d","x","g","x","g","Tensor","which","we","Kronecker","product","to","get","a","g","x","g","KroneckerProductLinearOperator",".","..","_Fast","kernel","learning","for","multidimensional","pattern","extrapolation",":","http",":","\/\/www.cs.cmu.edu\/~andrewgw\/manet.pdf"]
docstr: Helper to register several buffers at once under a single base name
docstr_tok: ["Helper","to","register","several","buffers","at","once","under","a","single","base","name"]
code: def register_buffer_list(self, base_name, tensors):
      """Helper to register several buffers at once under a single base name"""
      for i, tensor in enumerate(tensors):
          self.register_buffer(base_name + "_" + str(i), tensor)
  
file_path: gpytorch/gpytorch/kernels/grid_kernel.py
imports: from typing import Optional
  import torch
  from linear_operator import to_dense
  from linear_operator.operators import KroneckerProductLinearOperator, ToeplitzLinearOperator
  from torch import Tensor
  from ..None import settings
  from ..utils.grid import convert_legacy_grid, create_data_from_grid
  from .kernel import Kernel
label_desc: Use image node_id 3 for calling the GridKernel obj's underlying member method code with example usage: obj.register_buffer_list(base_name, tensors) without return types