예제 #1
0
 def test_empty(self):
     self.assertEqual(
         group_by_relation_type(
             torch.empty((0, ), dtype=torch.long),
             EntityList.empty(),
             EntityList.empty(),
         ),
         [],
     )
예제 #2
0
 def test_empty(self):
     self.assertEqual(
         EdgeList.empty(),
         EdgeList(
             EntityList.empty(),
             EntityList.empty(),
             torch.empty((0, ), dtype=torch.long),
         ),
     )
 def test_empty(self):
     self.assertEqual(
         EntityList.empty(),
         EntityList(torch.empty((0, ), dtype=torch.long),
                    TensorList.empty()),
     )
예제 #4
0
 def empty(cls) -> "EdgeList":
     return cls(
         EntityList.empty(), EntityList.empty(), torch.empty((0,), dtype=torch.long)
     )