docstr: Gaussian RBF kernel dissimilarity/distance: :math:`k(x, y) = 1 - \exp(-\frac{||x-y||^2}{2\sigma^2})`.
  A forward pass takes a batch of instances `x` of size `Nx x f1 x f2 x ...` and
  `y` of size `Ny x f1 x f2 x ...` and returns the kernel matrix of size `Nx x Ny`.
  
  Parameters
  ----------
  sigma
      See :py:meth:`alibi.utils.kernel.GaussianRBF.__init__`.
docstr_tok: ["Gaussian","RBF","kernel","dissimilarity\/distance",":",":","math",":","`","k","(","x",",","y",")","=","1","-","\\exp","(","-\\frac","{","||x-y||^2","}","{","2\\sigma^2","}",")","`",".","A","forward","pass","takes","a","batch","of","instances","`","x","`","of","size","`","Nx","x","f1","x","f2","x","...","`","and","`","y","`","of","size","`","Ny","x","f1","x","f2","x","...","`","and","returns","the","kernel","matrix","of","size","`","Nx","x","Ny","`",".","Parameters","--","--","--","--","--","sigma","See",":","py",":","meth",":","`","alibi.utils.kernel.GaussianRBF.__init__","`","."]
code: def __init__(self, sigma: Optional[Union[float, np.ndarray]] = None):
      """
      Gaussian RBF kernel dissimilarity/distance: :math:`k(x, y) = 1 - \\exp(-\\frac{||x-y||^2}{2\\sigma^2})`.
      A forward pass takes a batch of instances `x` of size `Nx x f1 x f2 x ...` and
      `y` of size `Ny x f1 x f2 x ...` and returns the kernel matrix of size `Nx x Ny`.
  
      Parameters
      ----------
      sigma
          See :py:meth:`alibi.utils.kernel.GaussianRBF.__init__`.
      """
      super().__init__()
      self.kernel = GaussianRBF(sigma=sigma)
  
file_path: alibi/alibi/utils/kernel.py
imports: import numpy
  from typing import Union, Optional
  from alibi.utils.distance import squared_pairwise_distance
label_desc: Use image node_id 1 to create a new GaussianRBFDistance object  with example: obj = GaussianRBFDistance(sigma)