docstr: Quaternion calculations are differentiable.
docstr_tok: ["Quaternion","calculations","are","differentiable","."]
code: def test_quat_grad_exists(self):
      """Quaternion calculations are differentiable."""
      rotation = random_rotation()
      rotation.requires_grad = True
      modified = quaternion_to_matrix(matrix_to_quaternion(rotation))
      [g] = torch.autograd.grad(modified.sum(), rotation)
      self.assertTrue(torch.isfinite(g).all())
  
imports: import itertools
  import math
  import unittest
  from distutils.version import LooseVersion
  from typing import Optional, Union
  import numpy
  import torch
  from pytorch3d.transforms.rotation_conversions import axis_angle_to_matrix, axis_angle_to_quaternion, euler_angles_to_matrix, matrix_to_axis_angle, matrix_to_euler_angles, matrix_to_quaternion, matrix_to_rotation_6d, quaternion_apply, quaternion_multiply, quaternion_to_axis_angle, quaternion_to_matrix, random_quaternions, random_rotation, random_rotations, rotation_6d_to_matrix
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 4 for calling the TestRotationConversion obj's underlying member method code with example usage: obj.test_quat_grad_exists() without return types