class_docstr: Blur a tensor using a Guided filter.
  
  The operator is an edge-preserving image smoothing filter. See :cite:`he2010guided`
  and :cite:`he2015fast` for details. Guidance and input can have different number of channels.
  
  Arguments:
      kernel_size: the size of the kernel.
      eps: regularization parameter. Smaller values preserve more edges.
      border_type: the padding mode to be applied before convolving.
        The expected modes are: ``'constant'``, ``'reflect'``,
        ``'replicate'`` or ``'circular'``. Default: ``'reflect'``.
      subsample: subsampling factor for Fast Guided filtering. Default: 1 (no subsampling)
  
  Returns:
      the blurred input tensor.
  
  Shape:
      - Input: :math:`(B, C, H, W)`, :math:`(B, C, H, W)`
      - Output: :math:`(B, C, H, W)`
  
  Examples:
      >>> guidance = torch.rand(2, 3, 5, 5)
      >>> input = torch.rand(2, 4, 5, 5)
      >>> blur = GuidedBlur(3, 0.1)
      >>> output = blur(guidance, input)
      >>> output.shape
      torch.Size([2, 4, 5, 5])
class_docstr_tok: ["Blur","a","tensor","using","a","Guided","filter",".","The","operator","is","an","edge-preserving","image","smoothing","filter",".","See",":","cite",":","`","he2010guided","`","and",":","cite",":","`","he2015fast","`","for","details",".","Guidance","and","input","can","have","different","number","of","channels",".","Arguments",":","kernel_size",":","the","size","of","the","kernel",".","eps",":","regularization","parameter",".","Smaller","values","preserve","more","edges",".","border_type",":","the","padding","mode","to","be","applied","before","convolving",".","The","expected","modes","are",":","``","'constant","'","``",",","``","'reflect","'","``",",","``","'replicate","'","``","or","``","'circular","'","``",".","Default",":","``","'reflect","'","``",".","subsample",":","subsampling","factor","for","Fast","Guided","filtering",".","Default",":","1","(","no","subsampling",")","Returns",":","the","blurred","input","tensor",".","Shape",":","-","Input",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`",",",":","math",":","`","(","B",",","C",",","H",",","W",")","`","-","Output",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`","Examples",":",">",">",">","guidance","=","torch.rand","(","2",",","3",",","5",",","5",")",">",">",">","input","=","torch.rand","(","2",",","4",",","5",",","5",")",">",">",">","blur","=","GuidedBlur","(","3",",","0.1",")",">",">",">","output","=","blur","(","guidance",",","input",")",">",">",">","output.shape","torch.Size","(","[","2",",","4",",","5",",","5","]",")"]
code: def __init__(
      self,
      kernel_size: tuple[int, int] | int,
      eps: float,
      border_type: str = "reflect",
      subsample: int = 1,
  ) -> None:
      super().__init__()
      self.kernel_size = kernel_size
      self.eps = eps
      self.border_type = border_type
      self.subsample = subsample
  
file_path: kornia/kornia/filters/guided.py
imports: from __future__ import annotations
  import torch
  from torch.nn.functional import interpolate
  from kornia.core import Module, Tensor
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from .blur import box_blur
  from .kernels import _unpack_2d_ks
label_desc: Use image node_id 1 to create a new GuidedBlur object from inherited base classes: Module with example: obj = GuidedBlur(kernel_size, eps, border_type, subsample)