docstr: Test vert align vs naive implementation with verts as tensor.
docstr_tok: ["Test","vert","align","vs","naive","implementation","with","verts","as","tensor","."]
code: def test_vert_align_with_verts(self):
      """
      Test vert align vs naive implementation with verts as tensor.
      """
      feats = TestVertAlign.init_feats(10, 256)
      verts = (
          torch.rand(
              (10, 100, 3), dtype=torch.float32, device=feats[0].device
          )
          * 2.0
          - 1.0
      )
  
      # feats in list
      out = vert_align(feats, verts, return_packed=True)
      naive_out = TestVertAlign.vert_align_naive(
          feats, verts, return_packed=True
      )
      self.assertClose(out, naive_out)
  
      # feats as tensor
      out = vert_align(feats[0], verts, return_packed=True)
      naive_out = TestVertAlign.vert_align_naive(
          feats[0], verts, return_packed=True
      )
      self.assertClose(out, naive_out)
  
      out2 = vert_align(
          feats[0], verts, return_packed=True, align_corners=False
      )
      naive_out2 = TestVertAlign.vert_align_naive(
          feats[0], verts, return_packed=True, align_corners=False
      )
      self.assertFalse(torch.allclose(out, out2))
      self.assertTrue(torch.allclose(out2, naive_out2))
  
file_path: pytorch3d/tests/test_vert_align.py
imports: import unittest
  import torch
  import torch.nn.functional
  from pytorch3d.ops.vert_align import vert_align
  from pytorch3d.structures.meshes import Meshes
  from pytorch3d.structures.pointclouds import Pointclouds
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 7 for calling the TestVertAlign obj's underlying member method code with example usage: obj.test_vert_align_with_verts() without return types