Skip to content

Commit 9d4657c

Browse files
committed
fix osme missing atols
1 parent 33cb1f7 commit 9d4657c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/models/dpt/test_modeling_dpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def test_post_processing_depth_estimation(self):
410410
predicted_depth.unsqueeze(0).unsqueeze(1), size=(500, 500), mode="bicubic", align_corners=False
411411
).squeeze()
412412
self.assertTrue(output_enlarged.shape == expected_shape)
413-
torch.testing.assert_close(predicted_depth_l, output_enlarged, rtol=1e-3)
413+
torch.testing.assert_close(predicted_depth_l, output_enlarged, atol=1e-3, rtol=1e-3)
414414

415415
def test_export(self):
416416
for strict in [True, False]:

tests/models/zoedepth/test_modeling_zoedepth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def check_post_processing_test(self, image_processor, images, model, pad_input=T
323323
for img, out, expected_slice in zip(images, outputs, expected_slices):
324324
out = out["predicted_depth"]
325325
self.assertTrue(img.size == out.shape[::-1])
326-
torch.testing.assert_close(expected_slice, out[:3, :3], rtol=1e-3)
326+
torch.testing.assert_close(expected_slice, out[:3, :3], atol=1e-3, rtol=1e-3)
327327

328328
self.check_target_size(image_processor, pad_input, images, outputs, raw_outputs, raw_outputs_flipped)
329329

0 commit comments

Comments
 (0)