code: def batch_2x2_inv(m: Tensor, check_dets: bool = False) -> Tensor:
      a = m[..., 0, 0]
      b = m[..., 0, 1]
      c = m[..., 1, 0]
      d = m[..., 1, 1]
      minv = torch.empty_like(m)
      det = a * d - b * c
      if check_dets:
          det[torch.abs(det) < 1e-10] = 1e-10
      minv[..., 0, 0] = d
      minv[..., 1, 1] = a
      minv[..., 0, 1] = -b
      minv[..., 1, 0] = -c
      return minv / det.unsqueeze(-1).unsqueeze(-1)
  
file_path: kornia/kornia/feature/adalam/utils.py
imports: import math
  from typing import Tuple
  import torch
  from kornia.core import Tensor
label_desc: Use image node_id 5 for calling a global function with example usage: batch_2x2_inv(m, check_dets) and returns: unknown