fix(DPT,Depth-Anything) Address expected_slice errors inside inference tests (#34518)

* fix(DPT,Depth-Anything) Address expected_slice errors inside inference tests

Signed-off-by: Phillip Kuznetsov <philkuz@gimletlabs.ai>

* [run_slow] dpt, depth_anything

---------

Signed-off-by: Phillip Kuznetsov <philkuz@gimletlabs.ai>
This commit is contained in:
Phillip Kuznetsov
2024-10-31 08:47:58 -07:00
committed by GitHub
parent 4ca004eac6
commit b5919e12f7
2 changed files with 3 additions and 3 deletions

View File

@@ -274,7 +274,7 @@ class DPTModelIntegrationTest(unittest.TestCase):
self.assertEqual(predicted_depth.shape, expected_shape)
expected_slice = torch.tensor(
[[6.0433, 7.1636, 7.4268], [6.9047, 7.2471, 7.2355], [7.9261, 8.0631, 8.0244]]
[[6.0336, 7.1502, 7.4130], [6.8977, 7.2383, 7.2268], [7.9180, 8.0525, 8.0134]]
).to(torch_device)
self.assertTrue(torch.allclose(outputs.predicted_depth[0, :3, :3], expected_slice, atol=1e-4))