docstr: Check outputs of tensorized and iterative implementations are the same.
docstr_tok: ["Check","outputs","of","tensorized","and","iterative","implementations","are","the","same","."]
code: def test_mesh_edge_loss_output(self):
      """
      Check outputs of tensorized and iterative implementations are the same.
      """
      device = torch.device("cuda:0")
      target_length = 0.5
      num_meshes = 10
      num_verts = 32
      num_faces = 64
  
      verts_list = []
      faces_list = []
      valid = torch.randint(2, size=(num_meshes,))
  
      for n in range(num_meshes):
          if valid[n]:
              vn = torch.randint(3, high=num_verts, size=(1,))[0].item()
              fn = torch.randint(vn, high=num_faces, size=(1,))[
                  0
              ].item()
              verts = torch.rand(
                  (vn, 3), dtype=torch.float32, device=device
              )
              faces = torch.randint(
                  vn, size=(fn, 3), dtype=torch.int64, device=device
              )
          else:
              verts = torch.tensor(
                  [], dtype=torch.float32, device=device
              )
              faces = torch.tensor([], dtype=torch.int64, device=device)
          verts_list.append(verts)
          faces_list.append(faces)
      meshes = Meshes(verts=verts_list, faces=faces_list)
      loss = mesh_edge_loss(meshes, target_length=target_length)
  
      predloss = TestMeshEdgeLoss.mesh_edge_loss_naive(
          meshes, target_length
      )
      self.assertClose(loss, predloss)
  
file_path: pytorch3d/tests/test_mesh_edge_loss.py
imports: import unittest
  import torch
  from pytorch3d.loss import mesh_edge_loss
  from pytorch3d.structures import Meshes
  from .common_testing import TestCaseMixin
  from .test_sample_points_from_meshes import init_meshes
label_desc: Use image node_id 3 for calling the TestMeshEdgeLoss obj's underlying member method code with example usage: obj.test_mesh_edge_loss_output() without return types