code: def hat_inv(h: torch.Tensor) -> torch.Tensor:
      """
      Compute the inverse Hat operator [1] of a batch of 3x3 matrices.
  
      Args:
          h: Batch of skew-symmetric matrices of shape `(minibatch, 3, 3)`.
  
      Returns:
          Batch of 3d vectors of shape `(minibatch, 3, 3)`.
  
      Raises:
          ValueError if `h` is of incorrect shape.
          ValueError if `h` not skew-symmetric.
  
      [1] https://en.wikipedia.org/wiki/Hat_operator
      """
  
      N, dim1, dim2 = h.shape
      if dim1 != 3 or dim2 != 3:
          raise ValueError("Input has to be a batch of 3x3 Tensors.")
  
      ss_diff = torch.abs(h + h.permute(0, 2, 1)).max()
  
      HAT_INV_SKEW_SYMMETRIC_TOL = 1e-5
      if float(ss_diff) > HAT_INV_SKEW_SYMMETRIC_TOL:
          raise ValueError(
              "One of input matrices is not skew-symmetric."
          )
  
      x = h[:, 2, 1]
      y = h[:, 0, 2]
      z = h[:, 1, 0]
  
      v = torch.stack((x, y, z), dim=1)
  
      return v
  
file_path: pytorch3d/pytorch3d/transforms/so3.py
imports: import warnings
  from typing import Tuple
  import torch
  from pytorch3d.transforms import rotation_conversions
  from ..transforms import acos_linear_extrapolation
label_desc: Use image node_id 7 for calling a global function with example usage: hat_inv(h) and returns: v