Skip to content

Commit 43d3b19

Browse files
authored
Update expected output values after #39885 (part 1) (#39990)
fix Co-authored-by: ydshieh <[email protected]>
1 parent d5a0809 commit 43d3b19

29 files changed

+103
-103
lines changed

tests/models/beit/test_modeling_beit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,9 @@ def test_inference_semantic_segmentation(self):
517517

518518
expected_slice = torch.tensor(
519519
[
520-
[[-4.8963, -2.3696, -3.0359], [-2.8485, -0.9842, -1.7426], [-2.9453, -1.3338, -2.1463]],
521-
[[-5.8099, -3.4140, -4.1025], [-3.8578, -2.2100, -3.0337], [-3.8383, -2.4615, -3.3681]],
522-
[[-0.0314, 3.9864, 4.0536], [2.9637, 4.6879, 4.9976], [3.2074, 4.7690, 4.9946]],
520+
[[-4.8960, -2.3688, -3.0355], [-2.8479, -0.9836, -1.7418], [-2.9449, -1.3333, -2.1456]],
521+
[[-5.8081, -3.4124, -4.1006], [-3.8561, -2.2081, -3.0323], [-3.8365, -2.4601, -3.3669]],
522+
[[-0.0309, 3.9868, 4.0540], [2.9640, 4.6877, 4.9976], [3.2081, 4.7690, 4.9942]],
523523
],
524524
device=torch_device,
525525
)

tests/models/conditional_detr/test_modeling_conditional_detr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def test_inference_object_detection_head(self):
622622
)[0]
623623
expected_scores = torch.tensor([0.8330, 0.8315, 0.8039, 0.6829, 0.5354]).to(torch_device)
624624
expected_labels = [75, 17, 17, 75, 63]
625-
expected_slice_boxes = torch.tensor([38.3109, 72.1002, 177.6301, 118.4511]).to(torch_device)
625+
expected_slice_boxes = torch.tensor([38.3089, 72.1023, 177.6292, 118.4514]).to(torch_device)
626626

627627
self.assertEqual(len(results["scores"]), 5)
628628
torch.testing.assert_close(results["scores"], expected_scores, rtol=2e-4, atol=2e-4)

tests/models/d_fine/test_modeling_d_fine.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -779,9 +779,9 @@ def test_inference_object_detection_head(self):
779779

780780
expected_logits = torch.tensor(
781781
[
782-
[-3.8221, -4.7679, -6.0063],
783-
[-5.2994, -9.5009, -6.1697],
784-
[-5.3103, -3.8005, -6.2972],
782+
[-3.8098, -4.7725, -5.9945],
783+
[-5.2975, -9.4991, -6.1654],
784+
[-5.3502, -3.9532, -6.3631],
785785
]
786786
).to(torch_device)
787787
expected_boxes = torch.tensor(
@@ -803,14 +803,14 @@ def test_inference_object_detection_head(self):
803803
outputs, threshold=0.0, target_sizes=[image.size[::-1]]
804804
)[0]
805805

806-
expected_scores = torch.tensor([0.9616, 0.9541, 0.9541, 0.8551], device=torch_device)
806+
expected_scores = torch.tensor([0.9642, 0.9542, 0.9536, 0.8548], device=torch_device)
807807
expected_labels = [15, 65, 15, 57]
808808
expected_slice_boxes = torch.tensor(
809809
[
810-
[1.3358e01, 5.4123e01, 3.1726e02, 4.7222e02],
811-
[4.0274e01, 7.2972e01, 1.7620e02, 1.1777e02],
812-
[3.4270e02, 2.3427e01, 6.3998e02, 3.7476e02],
813-
[5.7796e-01, 1.1773e00, 6.3933e02, 4.7486e02],
810+
[1.3186e01, 5.4130e01, 3.1727e02, 4.7212e02],
811+
[4.0275e01, 7.2975e01, 1.7620e02, 1.1777e02],
812+
[3.4276e02, 2.3428e01, 6.3998e02, 3.7477e02],
813+
[5.8418e-01, 1.1794e00, 6.3933e02, 4.7486e02],
814814
],
815815
device=torch_device,
816816
)

tests/models/dab_detr/test_modeling_dab_detr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,9 @@ def test_inference_no_head(self):
788788
self.assertEqual(outputs.last_hidden_state.shape, expected_shape)
789789
expected_slice = torch.tensor(
790790
[
791-
[-0.4878, -0.2593, 0.4521],
792-
[-0.4999, -0.4257, 0.4326],
793-
[-0.8220, -0.4997, 0.0578],
791+
[-0.4879, -0.2594, 0.4524],
792+
[-0.4997, -0.4258, 0.4329],
793+
[-0.8220, -0.4996, 0.0577],
794794
]
795795
).to(torch_device)
796796
torch.testing.assert_close(outputs.last_hidden_state[0, :3, :3], expected_slice, atol=2e-4, rtol=2e-4)

tests/models/deformable_detr/test_modeling_deformable_detr.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,9 @@ def test_inference_object_detection_head(self):
678678

679679
expected_logits = torch.tensor(
680680
[
681-
[-9.6644, -4.3434, -5.8707],
682-
[-9.7035, -3.8503, -5.0721],
683-
[-10.5633, -5.3387, -7.5119],
681+
[-9.6645, -4.3449, -5.8705],
682+
[-9.7035, -3.8504, -5.0724],
683+
[-10.5634, -5.3379, -7.5116],
684684
]
685685
).to(torch_device)
686686
expected_boxes = torch.tensor(
@@ -703,7 +703,7 @@ def test_inference_object_detection_head(self):
703703
)[0]
704704
expected_scores = torch.tensor([0.7999, 0.7895, 0.6332, 0.4719, 0.4382]).to(torch_device)
705705
expected_labels = [17, 17, 75, 75, 63]
706-
expected_slice_boxes = torch.tensor([16.4960, 52.8387, 318.2565, 470.7831]).to(torch_device)
706+
expected_slice_boxes = torch.tensor([16.5028, 52.8391, 318.2544, 470.7841]).to(torch_device)
707707

708708
self.assertEqual(len(results["scores"]), 5)
709709
torch.testing.assert_close(results["scores"], expected_scores, rtol=2e-4, atol=2e-4)
@@ -729,15 +729,15 @@ def test_inference_object_detection_head_with_box_refine_two_stage(self):
729729

730730
expected_logits = torch.tensor(
731731
[
732-
[-6.7112, -4.3216, -6.3781],
733-
[-8.9035, -6.1738, -6.7249],
734-
[-6.9314, -4.4736, -6.2303],
732+
[-6.7108, -4.3213, -6.3777],
733+
[-8.9014, -6.1799, -6.7240],
734+
[-6.9315, -4.4735, -6.2298],
735735
]
736736
).to(torch_device)
737737
expected_boxes = torch.tensor(
738738
[
739-
[0.2582, 0.5499, 0.4683],
740-
[0.7652, 0.9084, 0.4884],
739+
[0.2583, 0.5499, 0.4683],
740+
[0.7652, 0.9068, 0.4882],
741741
[0.5490, 0.2763, 0.0564],
742742
]
743743
).to(torch_device)

tests/models/detr/test_modeling_detr.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ def test_inference_no_head(self):
589589
{
590590
(None, None):
591591
[
592-
[0.0622, -0.5142, -0.4034],
593-
[-0.7628, -0.4935, -1.7153],
594-
[-0.4751, -0.6386, -0.7818],
592+
[0.0616, -0.5146, -0.4032],
593+
[-0.7629, -0.4934, -1.7153],
594+
[-0.4768, -0.6403, -0.7826],
595595
],
596596
("rocm", (9, 5)):
597597
[
@@ -623,9 +623,9 @@ def test_inference_object_detection_head(self):
623623
{
624624
(None, None):
625625
[
626-
[-19.1211, -0.0881, -11.0188],
627-
[-17.3641, -1.8045, -14.0229],
628-
[-20.0415, -0.5833, -11.1005],
626+
[-19.1194, -0.0893, -11.0154],
627+
[-17.3640, -1.8035, -14.0219],
628+
[-20.0461, -0.5837, -11.1060],
629629
],
630630
("rocm", (9, 5)):
631631
[
@@ -681,9 +681,9 @@ def test_inference_panoptic_segmentation_head(self):
681681
{
682682
(None, None):
683683
[
684-
[-18.1523, -1.7592, -13.5019],
685-
[-16.8866, -1.4139, -14.1025],
686-
[-17.5735, -2.5090, -11.8666],
684+
[-18.1565, -1.7568, -13.5029],
685+
[-16.8888, -1.4138, -14.1028],
686+
[-17.5709, -2.5080, -11.8654],
687687
],
688688
("rocm", (9, 5)):
689689
[
@@ -702,9 +702,9 @@ def test_inference_panoptic_segmentation_head(self):
702702
{
703703
(None, None):
704704
[
705-
[0.5344, 0.1790, 0.9284],
706-
[0.4421, 0.0571, 0.0875],
707-
[0.6632, 0.6886, 0.1015]
705+
[0.5344, 0.1789, 0.9285],
706+
[0.4420, 0.0572, 0.0875],
707+
[0.6630, 0.6887, 0.1017],
708708
],
709709
("rocm", (9, 5)):
710710
[
@@ -723,9 +723,9 @@ def test_inference_panoptic_segmentation_head(self):
723723
{
724724
(None, None):
725725
[
726-
[-7.8408, -11.0104, -12.1279],
727-
[-12.0299, -16.6498, -17.9806],
728-
[-14.8995, -19.9940, -20.5646],
726+
[-7.7557, -10.8788, -11.9797],
727+
[-11.8880, -16.4328, -17.7450],
728+
[-14.7315, -19.7382, -20.3003],
729729
],
730730
("rocm", (9, 5)):
731731
[
@@ -793,9 +793,9 @@ def test_inference_no_head(self):
793793
{
794794
(None, None):
795795
[
796-
[0.0622, -0.5142, -0.4034],
797-
[-0.7628, -0.4935, -1.7153],
798-
[-0.4751, -0.6386, -0.7818],
796+
[0.0616, -0.5146, -0.4032],
797+
[-0.7629, -0.4934, -1.7153],
798+
[-0.4768, -0.6403, -0.7826],
799799
],
800800
("rocm", (9, 5)):
801801
[

tests/models/dpt/test_modeling_dpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def test_inference_depth_estimation(self):
345345
expectations = Expectations(
346346
{
347347
(None, None): [[6.3199, 6.3629, 6.4148], [6.3850, 6.3615, 6.4166], [6.3519, 6.3176, 6.3575]],
348-
("cuda", 8): [[6.3215, 6.3635, 6.4155], [6.3863, 6.3622, 6.4174], [6.3530, 6.3184, 6.3583]],
348+
("cuda", 8): [[6.3199, 6.3629, 6.4148], [6.3850, 6.3615, 6.4166], [6.3519, 6.3176, 6.3575]],
349349
}
350350
)
351351
expected_slice = torch.tensor(expectations.get_expectation()).to(torch_device)

tests/models/fastspeech2_conformer/test_modeling_fastspeech2_conformer.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,16 +393,16 @@ def test_inference_integration(self):
393393
[0.7831, -0.2663, 1.0352, 1.4489, 0.9088, 0.0247, -0.3995, 0.0078, 1.2446, 1.6998],
394394
],
395395
("cuda", 8): [
396-
[-1.2425, -1.7282, -1.6750, -1.7448, -1.6400, -1.5217, -1.4478, -1.3341, -1.4026, -1.4493],
397-
[-0.7858, -1.4967, -1.3601, -1.4875, -1.2950, -1.0725, -1.0021, -0.7553, -0.6522, -0.6929],
398-
[-0.7303, -1.3911, -1.0370, -1.2656, -1.0345, -0.7888, -0.7423, -0.5251, -0.3737, -0.3979],
399-
[-0.4784, -1.3506, -1.1556, -1.4677, -1.2820, -1.0253, -1.0868, -0.9006, -0.8949, -0.8448],
400-
[-0.3968, -1.2896, -1.2811, -1.6145, -1.4660, -1.2564, -1.4135, -1.2652, -1.3258, -1.1716],
401-
[-1.4912, -1.3092, -0.3812, -0.3886, -0.5737, -0.9034, -1.0749, -1.0571, -1.2202, -1.0567],
402-
[0.0200, -0.0577, 0.9151, 1.1516, 1.1656, 0.6628, -0.1012, -0.3086, -0.2283, 0.2658],
403-
[1.1778, 0.1805, 0.7255, 1.5732, 1.6680, 0.4539, -0.1572, -0.1785, 0.0751, 0.8175],
404-
[-0.2088, -0.3212, 1.1101, 1.5085, 1.4625, 0.6293, -0.0522, 0.0587, 0.8615, 1.4432],
405-
[0.7834, -0.2659, 1.0355, 1.4486, 0.9080, 0.0244, -0.3995, 0.0083, 1.2452, 1.6998],
396+
[-1.2426, -1.7286, -1.6754, -1.7451, -1.6402, -1.5219, -1.4480, -1.3345, -1.4030, -1.4497],
397+
[-0.7858, -1.4966, -1.3601, -1.4876, -1.2949, -1.0723, -1.0021, -0.7553, -0.6521, -0.6929],
398+
[-0.7298, -1.3908, -1.0369, -1.2656, -1.0342, -0.7883, -0.7420, -0.5249, -0.3734, -0.3977],
399+
[-0.4784, -1.3508, -1.1558, -1.4678, -1.2820, -1.0252, -1.0868, -0.9006, -0.8947, -0.8448],
400+
[-0.3963, -1.2895, -1.2813, -1.6147, -1.4658, -1.2560, -1.4134, -1.2650, -1.3255, -1.1715],
401+
[-1.4913, -1.3097, -0.3820, -0.3897, -0.5747, -0.9040, -1.0755, -1.0575, -1.2205, -1.0571],
402+
[ 0.0197, -0.0582, 0.9148, 1.1512, 1.1651, 0.6628, -0.1009, -0.3085, -0.2285, 0.2651],
403+
[ 1.1780, 0.1803, 0.7251, 1.5728, 1.6677, 0.4542, -0.1572, -0.1787, 0.0744, 0.8168],
404+
[-0.2078, -0.3211, 1.1096, 1.5085, 1.4631, 0.6299, -0.0515, 0.0589, 0.8609, 1.4429],
405+
[ 0.7831, -0.2663, 1.0352, 1.4488, 0.9087, 0.0247, -0.3995, 0.0079, 1.2447, 1.6998],
406406
],
407407
}
408408
)

tests/models/grounding_dino/test_modeling_grounding_dino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ def test_inference_object_detection_head(self):
692692
expectations = Expectations(
693693
{
694694
(None, None): [[-4.8913, -0.1900, -0.2161], [-4.9653, -0.3719, -0.3950], [-5.9599, -3.3765, -3.3104]],
695-
("cuda", 8): [[-4.8927, -0.1910, -0.2169], [-4.9657, -0.3748, -0.3980], [-5.9579, -3.3812, -3.3153]],
695+
("cuda", 8): [[-4.8915, -0.1900, -0.2161], [-4.9658, -0.3716, -0.3948], [-5.9596, -3.3763, -3.3103]],
696696
}
697697
)
698698
expected_logits = torch.tensor(expectations.get_expectation()).to(torch_device)

tests/models/levit/test_modeling_levit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def test_inference_image_classification_head(self):
409409
expectations = Expectations(
410410
{
411411
(None, None): [1.0448, -0.3745, -1.8317],
412-
("cuda", 8): [1.0453, -0.3739, -1.8314],
412+
("cuda", 8): [1.0448, -0.3745, -1.8317],
413413
}
414414
)
415415
expected_slice = torch.tensor(expectations.get_expectation()).to(torch_device)

0 commit comments

Comments
 (0)