class_docstr: https://discuss.pytorch.org/t/is-there-anyway-to-do-gaussian-filtering-for-an-image-2d-3d-in-pytorch/12351/10
  Apply gaussian smoothing on a tensor (1d, 2d, 3d).
  Filtering is performed seperately for each channel in the input using a depthwise convolution.
  Arguments:
      channels (int, sequence): Number of channels of the input tensors.
          Output will have this number of channels as well.
      kernel_size (int, sequence): Size of the gaussian kernel.
      sigma (float, sequence): Standard deviation of the gaussian kernel.
      dim (int, optional): The number of dimensions of the data. Default value is 2 (spatial).
class_docstr_tok: ["https",":","\/\/discuss.pytorch.org\/t\/is-there-anyway-to-do-gaussian-filtering-for-an-image-2d-3d-in-pytorch\/12351\/10","Apply","gaussian","smoothing","on","a","tensor","(","1d",",","2d",",","3d",")",".","Filtering","is","performed","seperately","for","each","channel","in","the","input","using","a","depthwise","convolution",".","Arguments",":","channels","(","int",",","sequence",")",":","Number","of","channels","of","the","input","tensors",".","Output","will","have","this","number","of","channels","as","well",".","kernel_size","(","int",",","sequence",")",":","Size","of","the","gaussian","kernel",".","sigma","(","float",",","sequence",")",":","Standard","deviation","of","the","gaussian","kernel",".","dim","(","int",",","optional",")",":","The","number","of","dimensions","of","the","data",".","Default","value","is","2","(","spatial",")","."]
docstr: Apply gaussian filter to input.
  Arguments:
      input (torch.Tensor): Input to apply gaussian filter on.
  Returns:
      filtered (torch.Tensor): Filtered output.
docstr_tok: ["Apply","gaussian","filter","to","input",".","Arguments",":","input","(","torch.Tensor",")",":","Input","to","apply","gaussian","filter","on",".","Returns",":","filtered","(","torch.Tensor",")",":","Filtered","output","."]
code: def forward(self, input):
      """
      Apply gaussian filter to input.
      Arguments:
          input (torch.Tensor): Input to apply gaussian filter on.
      Returns:
          filtered (torch.Tensor): Filtered output.
      """
      return self.conv(
          input,
          weight=self.weight,
          padding=self.padding,
          groups=self.groups,
      )
  
imports: import math
  import torch
  import numbers
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the GaussianSmoothing obj's underlying member method code with example usage: obj.forward(input) and returns: self