class_docstr: Compute the first and second order volume derivative in x, y and d using a diff operator.
  
  Args:
      mode: derivatives modality, can be: `sobel` or `diff`.
      order: the order of the derivatives.
  
  Return:
      the spatial gradients of the input feature map.
  
  Shape:
      - Input: :math:`(B, C, D, H, W)`. D, H, W are spatial dimensions, gradient is calculated w.r.t to them.
      - Output: :math:`(B, C, 3, D, H, W)` or :math:`(B, C, 6, D, H, W)`
  
  Examples:
      >>> input = torch.rand(1, 4, 2, 4, 4)
      >>> output = SpatialGradient3d()(input)
      >>> output.shape
      torch.Size([1, 4, 3, 2, 4, 4])
class_docstr_tok: ["Compute","the","first","and","second","order","volume","derivative","in","x",",","y","and","d","using","a","diff","operator",".","Args",":","mode",":","derivatives","modality",",","can","be",":","`","sobel","`","or","`","diff","`",".","order",":","the","order","of","the","derivatives",".","Return",":","the","spatial","gradients","of","the","input","feature","map",".","Shape",":","-","Input",":",":","math",":","`","(","B",",","C",",","D",",","H",",","W",")","`",".","D",",","H",",","W","are","spatial","dimensions",",","gradient","is","calculated","w.r.t","to","them",".","-","Output",":",":","math",":","`","(","B",",","C",",","3",",","D",",","H",",","W",")","`","or",":","math",":","`","(","B",",","C",",","6",",","D",",","H",",","W",")","`","Examples",":",">",">",">","input","=","torch.rand","(","1",",","4",",","2",",","4",",","4",")",">",">",">","output","=","SpatialGradient3d","(",")","(","input",")",">",">",">","output.shape","torch.Size","(","[","1",",","4",",","3",",","2",",","4",",","4","]",")"]
code: def __repr__(self) -> str:
      return f"{self.__class__.__name__}(order={self.order}, 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 SpatialGradient3d obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str