docstr: For a pair of randomly generated 3-dimensional vectors `a` and `b`,
  tests whether a matrix product of `hat(a)` and `b` equals the result
  of a cross product between `a` and `b`.
docstr_tok: ["For","a","pair","of","randomly","generated","3-dimensional","vectors","`","a","`","and","`","b","`",",","tests","whether","a","matrix","product","of","`","hat","(","a",")","`","and","`","b","`","equals","the","result","of","a","cross","product","between","`","a","`","and","`","b","`","."]
code: def test_cross(self):
      """
      For a pair of randomly generated 3-dimensional vectors `a` and `b`,
      tests whether a matrix product of `hat(a)` and `b` equals the result
      of a cross product between `a` and `b`.
      """
      device = torch.device("cuda:0")
      a, b = torch.randn(
          (2, 100, 3), dtype=torch.float32, device=device
      )
      hat_a = hat(a)
      cross = torch.bmm(hat_a, b[:, :, None])[:, :, 0]
      torch_cross = torch.cross(a, b, dim=1)
      self.assertClose(torch_cross, cross, atol=1e-4)
  
imports: import math
  import unittest
  from distutils.version import LooseVersion
  import numpy
  import torch
  from pytorch3d.transforms.so3 import hat, so3_exp_map, so3_log_map, so3_relative_angle, so3_rotation_angle
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 5 for calling the TestSO3 obj's underlying member method code with example usage: obj.test_cross() without return types