π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
fix xfeat dynamo (#3659)
Dmytro Mishkin6f03716ddc1f
diff --git a/tests/feature/test_xfeat.py b/tests/feature/test_xfeat.pyindex 0b90df399..8ff27c971 100644--- a/tests/feature/test_xfeat.py+++ b/tests/feature/test_xfeat.py@@ -58,9 +58,14 @@ class TestXFeatModel(BaseTester):op = torch_optimizer(model)feats_c, kpts_c, hm_c = op(x)feats, kpts, hm = model(x)- self.assert_close(feats_c, feats)- self.assert_close(kpts_c, kpts)- self.assert_close(hm_c, hm)+ if dtype in (torch.float32, torch.float64):+ self.assert_close(feats_c, feats, rtol=1e-3, atol=1e-4)+ self.assert_close(kpts_c, kpts, rtol=1e-3, atol=1e-4)+ self.assert_close(hm_c, hm, rtol=1e-3, atol=1e-4)+ else:+ self.assert_close(feats_c, feats)+ self.assert_close(kpts_c, kpts)+ self.assert_close(hm_c, hm)def test_heatmap_in_zero_one(self, device, dtype):model = XFeatModel().to(device, dtype)