@@ -1461,7 +1461,15 @@ def test_kernel_video(self):
14611461
14621462 @pytest .mark .parametrize (
14631463 "make_input" ,
1464- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
1464+ [
1465+ make_image_tensor ,
1466+ make_image_pil ,
1467+ make_image ,
1468+ make_bounding_boxes ,
1469+ make_segmentation_mask ,
1470+ make_video ,
1471+ make_keypoints ,
1472+ ],
14651473 )
14661474 def test_functional (self , make_input ):
14671475 check_functional (F .affine , make_input (), ** self ._MINIMAL_AFFINE_KWARGS )
@@ -1483,7 +1491,15 @@ def test_functional_signature(self, kernel, input_type):
14831491
14841492 @pytest .mark .parametrize (
14851493 "make_input" ,
1486- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
1494+ [
1495+ make_image_tensor ,
1496+ make_image_pil ,
1497+ make_image ,
1498+ make_bounding_boxes ,
1499+ make_segmentation_mask ,
1500+ make_video ,
1501+ make_keypoints ,
1502+ ],
14871503 )
14881504 @pytest .mark .parametrize ("device" , cpu_and_cuda ())
14891505 def test_transform (self , make_input , device ):
@@ -1645,7 +1661,6 @@ def _reference_affine_keypoints(self, keypoints, *, angle, translate, scale, she
16451661 ),
16461662 )
16471663
1648-
16491664 @pytest .mark .parametrize ("angle" , _CORRECTNESS_AFFINE_KWARGS ["angle" ])
16501665 @pytest .mark .parametrize ("translate" , _CORRECTNESS_AFFINE_KWARGS ["translate" ])
16511666 @pytest .mark .parametrize ("scale" , _CORRECTNESS_AFFINE_KWARGS ["scale" ])
@@ -2022,7 +2037,15 @@ def test_kernel_video(self):
20222037
20232038 @pytest .mark .parametrize (
20242039 "make_input" ,
2025- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
2040+ [
2041+ make_image_tensor ,
2042+ make_image_pil ,
2043+ make_image ,
2044+ make_bounding_boxes ,
2045+ make_segmentation_mask ,
2046+ make_video ,
2047+ make_keypoints ,
2048+ ],
20262049 )
20272050 def test_functional (self , make_input ):
20282051 check_functional (F .rotate , make_input (), ** self ._MINIMAL_AFFINE_KWARGS )
@@ -2044,7 +2067,15 @@ def test_functional_signature(self, kernel, input_type):
20442067
20452068 @pytest .mark .parametrize (
20462069 "make_input" ,
2047- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
2070+ [
2071+ make_image_tensor ,
2072+ make_image_pil ,
2073+ make_image ,
2074+ make_bounding_boxes ,
2075+ make_segmentation_mask ,
2076+ make_video ,
2077+ make_keypoints ,
2078+ ],
20482079 )
20492080 @pytest .mark .parametrize ("device" , cpu_and_cuda ())
20502081 def test_transform (self , make_input , device ):
@@ -3206,7 +3237,15 @@ def test_kernel_video(self):
32063237
32073238 @pytest .mark .parametrize (
32083239 "make_input" ,
3209- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
3240+ [
3241+ make_image_tensor ,
3242+ make_image_pil ,
3243+ make_image ,
3244+ make_bounding_boxes ,
3245+ make_segmentation_mask ,
3246+ make_video ,
3247+ make_keypoints ,
3248+ ],
32103249 )
32113250 def test_functional (self , make_input ):
32123251 input = make_input ()
@@ -3348,7 +3387,15 @@ def test_kernel_video(self):
33483387
33493388 @pytest .mark .parametrize (
33503389 "make_input" ,
3351- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
3390+ [
3391+ make_image_tensor ,
3392+ make_image_pil ,
3393+ make_image ,
3394+ make_bounding_boxes ,
3395+ make_segmentation_mask ,
3396+ make_video ,
3397+ make_keypoints ,
3398+ ],
33523399 )
33533400 def test_functional (self , make_input ):
33543401 check_functional (F .crop , make_input (self .INPUT_SIZE ), ** self .MINIMAL_CROP_KWARGS )
@@ -3383,7 +3430,15 @@ def test_functional_image_correctness(self, kwargs):
33833430 )
33843431 @pytest .mark .parametrize (
33853432 "make_input" ,
3386- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
3433+ [
3434+ make_image_tensor ,
3435+ make_image_pil ,
3436+ make_image ,
3437+ make_bounding_boxes ,
3438+ make_segmentation_mask ,
3439+ make_video ,
3440+ make_keypoints ,
3441+ ],
33873442 )
33883443 def test_transform (self , param , value , make_input ):
33893444 input = make_input (self .INPUT_SIZE )
@@ -4230,7 +4285,15 @@ def test_kernel(self, kernel, make_input):
42304285
42314286 @pytest .mark .parametrize (
42324287 "make_input" ,
4233- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4288+ [
4289+ make_image_tensor ,
4290+ make_image_pil ,
4291+ make_image ,
4292+ make_bounding_boxes ,
4293+ make_segmentation_mask ,
4294+ make_video ,
4295+ make_keypoints ,
4296+ ],
42344297 )
42354298 def test_functional (self , make_input ):
42364299 check_functional (
@@ -4258,7 +4321,15 @@ def test_functional_signature(self, kernel, input_type):
42584321 )
42594322 @pytest .mark .parametrize (
42604323 "make_input" ,
4261- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4324+ [
4325+ make_image_tensor ,
4326+ make_image_pil ,
4327+ make_image ,
4328+ make_bounding_boxes ,
4329+ make_segmentation_mask ,
4330+ make_video ,
4331+ make_keypoints ,
4332+ ],
42624333 )
42634334 def test_transform (self , param , value , make_input ):
42644335 check_transform (
@@ -4474,7 +4545,15 @@ def test_kernel_video(self):
44744545
44754546 @pytest .mark .parametrize (
44764547 "make_input" ,
4477- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4548+ [
4549+ make_image_tensor ,
4550+ make_image_pil ,
4551+ make_image ,
4552+ make_bounding_boxes ,
4553+ make_segmentation_mask ,
4554+ make_video ,
4555+ make_keypoints ,
4556+ ],
44784557 )
44794558 def test_functional (self , make_input ):
44804559 check_functional (F .pad , make_input (), padding = [1 ])
@@ -4499,7 +4578,15 @@ def test_functional_signature(self, kernel, input_type):
44994578
45004579 @pytest .mark .parametrize (
45014580 "make_input" ,
4502- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4581+ [
4582+ make_image_tensor ,
4583+ make_image_pil ,
4584+ make_image ,
4585+ make_bounding_boxes ,
4586+ make_segmentation_mask ,
4587+ make_video ,
4588+ make_keypoints ,
4589+ ],
45034590 )
45044591 def test_transform (self , make_input ):
45054592 check_transform (transforms .Pad (padding = [1 ]), make_input ())
@@ -4573,7 +4660,8 @@ def test_bounding_boxes_correctness(self, padding, format, dtype, device, fn):
45734660 expected = self ._reference_pad_bounding_boxes (bounding_boxes , padding = padding )
45744661
45754662 assert_equal (actual , expected )
4576- #TODOKP need keypoint correctness tests
4663+
4664+ # TODOKP need keypoint correctness tests
45774665
45784666
45794667class TestCenterCrop :
@@ -4624,7 +4712,15 @@ def test_kernel_video(self):
46244712
46254713 @pytest .mark .parametrize (
46264714 "make_input" ,
4627- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4715+ [
4716+ make_image_tensor ,
4717+ make_image_pil ,
4718+ make_image ,
4719+ make_bounding_boxes ,
4720+ make_segmentation_mask ,
4721+ make_video ,
4722+ make_keypoints ,
4723+ ],
46284724 )
46294725 def test_functional (self , make_input ):
46304726 check_functional (F .center_crop , make_input (self .INPUT_SIZE ), output_size = self .OUTPUT_SIZES [0 ])
@@ -4646,7 +4742,15 @@ def test_functional_signature(self, kernel, input_type):
46464742
46474743 @pytest .mark .parametrize (
46484744 "make_input" ,
4649- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4745+ [
4746+ make_image_tensor ,
4747+ make_image_pil ,
4748+ make_image ,
4749+ make_bounding_boxes ,
4750+ make_segmentation_mask ,
4751+ make_video ,
4752+ make_keypoints ,
4753+ ],
46504754 )
46514755 def test_transform (self , make_input ):
46524756 check_transform (transforms .CenterCrop (self .OUTPUT_SIZES [0 ]), make_input (self .INPUT_SIZE ))
@@ -4855,7 +4959,15 @@ def test_kernel_video(self):
48554959
48564960 @pytest .mark .parametrize (
48574961 "make_input" ,
4858- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4962+ [
4963+ make_image_tensor ,
4964+ make_image_pil ,
4965+ make_image ,
4966+ make_bounding_boxes ,
4967+ make_segmentation_mask ,
4968+ make_video ,
4969+ make_keypoints ,
4970+ ],
48594971 )
48604972 def test_functional (self , make_input ):
48614973 check_functional (F .perspective , make_input (), ** self .MINIMAL_KWARGS )
@@ -4878,7 +4990,15 @@ def test_functional_signature(self, kernel, input_type):
48784990 @pytest .mark .parametrize ("distortion_scale" , [0.5 , 0.0 , 1.0 ])
48794991 @pytest .mark .parametrize (
48804992 "make_input" ,
4881- [make_image_tensor , make_image_pil , make_image , make_bounding_boxes , make_segmentation_mask , make_video , make_keypoints ],
4993+ [
4994+ make_image_tensor ,
4995+ make_image_pil ,
4996+ make_image ,
4997+ make_bounding_boxes ,
4998+ make_segmentation_mask ,
4999+ make_video ,
5000+ make_keypoints ,
5001+ ],
48825002 )
48835003 def test_transform (self , distortion_scale , make_input ):
48845004 check_transform (transforms .RandomPerspective (distortion_scale = distortion_scale , p = 1 ), make_input ())
@@ -5831,6 +5951,7 @@ def test_transform(self, make_input, dtype, device):
58315951 "will degenerate to that anyway."
58325952 )
58335953
5954+ torch .manual_seed (1 ) # TODOKP why is this needed now??
58345955 check_transform (
58355956 transforms .ColorJitter (brightness = 0.5 , contrast = 0.5 , saturation = 0.5 , hue = 0.25 ),
58365957 make_input (dtype = dtype , device = device ),
0 commit comments