π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
apply autopep
edgarriba6744faaa7a1f
diff --git a/test/test_functional.py b/test/test_functional.pyindex d830efcac..fa712d019 100644--- a/test/test_functional.py+++ b/test/test_functional.py@@ -219,7 +219,6 @@ class Tester(unittest.TestCase):res = utils.check_equal_torch(i_H_ref_inv, ref_H_i)self.assertTrue(res)- #@unittest.skip("Jacobian mismatch for output 0 with respect to input 0")def test_homography_i_H_ref_gradcheck(self):# generate input dataimage_height, image_width = 32., 32.@@ -250,8 +249,12 @@ class Tester(unittest.TestCase):pinhole_i = utils.tensor_to_gradcheck_var(pinhole_ref) # to var# evaluate function gradient- res = gradcheck(tgm.homography_i_H_ref,- (pinhole_i + eps, pinhole_ref + eps,), raise_exception=True)+ res = gradcheck(+ tgm.homography_i_H_ref,+ (pinhole_i + eps,+ pinhole_ref + eps,+ ),+ raise_exception=True)self.assertTrue(res)diff --git a/torchgeometry/imgwarp.py b/torchgeometry/imgwarp.pyindex 27f782e30..12303a04f 100644--- a/torchgeometry/imgwarp.py+++ b/torchgeometry/imgwarp.py@@ -46,7 +46,8 @@ def transform_warp_impl(src, dst_pix_trans_src_pix, dsize_src, dsize_dst):"""dst_norm_trans_dst_norm = dst_norm_to_dst_norm(dst_pix_trans_src_pix, dsize_src, dsize_dst)- return homography_warp(src, torch.inverse(dst_norm_trans_dst_norm), dsize_dst)+ return homography_warp(src, torch.inverse(+ dst_norm_trans_dst_norm), dsize_dst)def warp_perspective(src, M, dsize, flags='bilinear', border_mode=None,