class_docstr: Blur 2D images (4D tensor) using the motion filter.
  
  Args:
      kernel_size: motion kernel width and height. It should be odd and positive.
      angle: angle of the motion blur in degrees (anti-clockwise rotation).
      direction: forward/backward direction of the motion blur.
          Lower values towards -1.0 will point the motion blur towards the back (with angle provided via angle),
          while higher values towards 1.0 will point the motion blur forward. A value of 0.0 leads to a
          uniformly (but still angled) motion blur.
      border_type: the padding mode to be applied before convolving. The expected modes are:
           ``'constant'``, ``'reflect'``, ``'replicate'`` or ``'circular'``.
      mode: interpolation mode for rotating the kernel. ``'bilinear'`` or ``'nearest'``.
  
  Returns:
      the blurred input tensor.
  
  Shape:
      - Input: :math:`(B, C, H, W)`
      - Output: :math:`(B, C, H, W)`
  
  Examples:
      >>> input = torch.rand(2, 4, 5, 7)
      >>> motion_blur = MotionBlur(3, 35., 0.5)
      >>> output = motion_blur(input)  # 2x4x5x7
class_docstr_tok: ["Blur","2D","images","(","4D","tensor",")","using","the","motion","filter",".","Args",":","kernel_size",":","motion","kernel","width","and","height",".","It","should","be","odd","and","positive",".","angle",":","angle","of","the","motion","blur","in","degrees","(","anti-clockwise","rotation",")",".","direction",":","forward\/backward","direction","of","the","motion","blur",".","Lower","values","towards","-1.0","will","point","the","motion","blur","towards","the","back","(","with","angle","provided","via","angle",")",",","while","higher","values","towards","1.0","will","point","the","motion","blur","forward",".","A","value","of","0.0","leads","to","a","uniformly","(","but","still","angled",")","motion","blur",".","border_type",":","the","padding","mode","to","be","applied","before","convolving",".","The","expected","modes","are",":","``","'constant","'","``",",","``","'reflect","'","``",",","``","'replicate","'","``","or","``","'circular","'","``",".","mode",":","interpolation","mode","for","rotating","the","kernel",".","``","'bilinear","'","``","or","``","'nearest","'","``",".","Returns",":","the","blurred","input","tensor",".","Shape",":","-","Input",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`","-","Output",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`","Examples",":",">",">",">","input","=","torch.rand","(","2",",","4",",","5",",","7",")",">",">",">","motion_blur","=","MotionBlur","(","3",",","35.",",","0.5",")",">",">",">","output","=","motion_blur","(","input",")","#","2x4x5x7"]
code: def __init__(
      self,
      kernel_size: int,
      angle: float,
      direction: float,
      border_type: str = "constant",
      mode: str = "nearest",
  ) -> None:
      super().__init__()
      self.kernel_size = kernel_size
      self.angle = angle
      self.direction = direction
      self.border_type = border_type
      self.mode = mode
  
file_path: kornia/kornia/filters/motion.py
imports: from __future__ import annotations
  from kornia.core import Module, Tensor
  from kornia.core.check import KORNIA_CHECK
  from .filter import filter2d, filter3d
  from .kernels_geometry import get_motion_kernel2d, get_motion_kernel3d
label_desc: Use image node_id 1 to create a new MotionBlur object from inherited base classes: Module with example: obj = MotionBlur(kernel_size, angle, direction, border_type, mode)