class_docstr: Laplacian loss is refer to
  https://github.com/JizhiziLi/AIM/blob/master/core/evaluate.py#L83
class_docstr_tok: ["Laplacian","loss","is","refer","to","https",":","\/\/github.com\/JizhiziLi\/AIM\/blob\/master\/core\/evaluate.py","#","L83"]
code: def build_gauss_kernel(self, size=5, sigma=1.0, n_channels=1):
      if size % 2 != 1:
          raise ValueError("kernel size must be uneven")
      grid = np.float32(np.mgrid[0:size, 0:size].T)
      gaussian = (
          lambda x: np.exp((x - size // 2) ** 2 / (-2 * sigma**2))
          ** 2
      )
      kernel = np.sum(gaussian(grid), axis=2)
      kernel /= np.sum(kernel)
      kernel = np.tile(kernel, (n_channels, 1, 1))
      kernel = paddle.to_tensor(kernel[:, None, :, :])
      kernel.stop_gradient = True
      return kernel
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  import cv2
label_desc: Use image node_id 3 for calling the LaplacianLoss obj's underlying member method code with example usage: obj.build_gauss_kernel(size, sigma, n_channels) and returns: kernel