class_docstr: Compute the first order image derivative in both x and y using a Sobel operator.
  
  Args:
      mode: derivatives modality, can be: `sobel` or `diff`.
      order: the order of the derivatives.
      normalized: whether the output is normalized.
  
  Return:
      the sobel edges of the input feature map.
  
  Shape:
      - Input: :math:`(B, C, H, W)`
      - Output: :math:`(B, C, 2, H, W)`
  
  Examples:
      >>> input = torch.rand(1, 3, 4, 4)
      >>> output = SpatialGradient()(input)  # 1x3x2x4x4
class_docstr_tok: ["Compute","the","first","order","image","derivative","in","both","x","and","y","using","a","Sobel","operator",".","Args",":","mode",":","derivatives","modality",",","can","be",":","`","sobel","`","or","`","diff","`",".","order",":","the","order","of","the","derivatives",".","normalized",":","whether","the","output","is","normalized",".","Return",":","the","sobel","edges","of","the","input","feature","map",".","Shape",":","-","Input",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`","-","Output",":",":","math",":","`","(","B",",","C",",","2",",","H",",","W",")","`","Examples",":",">",">",">","input","=","torch.rand","(","1",",","3",",","4",",","4",")",">",">",">","output","=","SpatialGradient","(",")","(","input",")","#","1x3x2x4x4"]
code: def __repr__(self) -> str:
      return f"{self.__class__.__name__}(order={self.order}, normalized={self.normalized}, mode={self.mode})"
  
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from kornia.core import Module, Tensor, pad
  from kornia.core.check import KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from .kernels import get_spatial_gradient_kernel2d, get_spatial_gradient_kernel3d, normalize_kernel2d
label_desc: Use image node_id 2 for calling the SpatialGradient obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str, self, str