コード例 #1
0
ファイル: test_utils.py プロジェクト: thiagocrepaldi/pytorch
 def try_check_onnx_broadcast(dims1, dims2, expect_broadcast, expect_fail):
     broadcast = True
     fail = False
     try:
         broadcast = check_onnx_broadcast(dims1, dims2)
     except ValueError:
         fail = True
     self.assertEqual(broadcast, expect_broadcast)
     self.assertEqual(fail, expect_fail)
コード例 #2
0
ファイル: test_utils.py プロジェクト: xiongyw/pytorch
 def try_check_onnx_broadcast(dims1, dims2, expect_broadcast, expect_fail):
     broadcast = True
     fail = False
     try:
         broadcast = check_onnx_broadcast(dims1, dims2)
     except ValueError:
         fail = True
     self.assertEqual(broadcast, expect_broadcast)
     self.assertEqual(fail, expect_fail)