@@ -293,24 +293,8 @@ def test_translations(self, device, height, width, dt, t, fn):
293
293
(33 , (5 , - 4 ), 1.0 , [0.0 , 0.0 ], [0 , 0 , 0 ]),
294
294
(45 , [- 5 , 4 ], 1.2 , [0.0 , 0.0 ], (1 , 2 , 3 )),
295
295
(33 , (- 4 , - 8 ), 2.0 , [0.0 , 0.0 ], [255 , 255 , 255 ]),
296
- (
297
- 85 ,
298
- (10 , - 10 ),
299
- 0.7 ,
300
- [0.0 , 0.0 ],
301
- [
302
- 1 ,
303
- ],
304
- ),
305
- (
306
- 0 ,
307
- [0 , 0 ],
308
- 1.0 ,
309
- [
310
- 35.0 ,
311
- ],
312
- (2.0 ,),
313
- ),
296
+ (85 , (10 , - 10 ), 0.7 , [0.0 , 0.0 ], [1 ]),
297
+ (0 , [0 , 0 ], 1.0 , [35.0 ], (2.0 ,)),
314
298
(- 25 , [0 , 0 ], 1.2 , [0.0 , 15.0 ], None ),
315
299
(- 45 , [- 10 , 0 ], 0.7 , [2.0 , 5.0 ], None ),
316
300
(- 45 , [- 10 , - 10 ], 1.2 , [4.0 , 5.0 ], None ),
@@ -392,19 +376,7 @@ def _get_data_dims_and_points_for_perspective():
392
376
@pytest .mark .parametrize ("device" , cpu_and_cuda ())
393
377
@pytest .mark .parametrize ("dims_and_points" , _get_data_dims_and_points_for_perspective ())
394
378
@pytest .mark .parametrize ("dt" , [None , torch .float32 , torch .float64 , torch .float16 ])
395
- @pytest .mark .parametrize (
396
- "fill" ,
397
- (
398
- None ,
399
- [0 , 0 , 0 ],
400
- [1 , 2 , 3 ],
401
- [255 , 255 , 255 ],
402
- [
403
- 1 ,
404
- ],
405
- (2.0 ,),
406
- ),
407
- )
379
+ @pytest .mark .parametrize ("fill" , (None , [0 , 0 , 0 ], [1 , 2 , 3 ], [255 , 255 , 255 ], [1 ], (2.0 ,)))
408
380
@pytest .mark .parametrize ("fn" , [F .perspective , torch .jit .script (F .perspective )])
409
381
def test_perspective_pil_vs_tensor (device , dims_and_points , dt , fill , fn ):
410
382
@@ -475,19 +447,7 @@ def test_perspective_interpolation_type():
475
447
476
448
@pytest .mark .parametrize ("device" , cpu_and_cuda ())
477
449
@pytest .mark .parametrize ("dt" , [None , torch .float32 , torch .float64 , torch .float16 ])
478
- @pytest .mark .parametrize (
479
- "size" ,
480
- [
481
- 32 ,
482
- 26 ,
483
- [
484
- 32 ,
485
- ],
486
- [32 , 32 ],
487
- (32 , 32 ),
488
- [26 , 35 ],
489
- ],
490
- )
450
+ @pytest .mark .parametrize ("size" , [32 , 26 , [32 ], [32 , 32 ], (32 , 32 ), [26 , 35 ]])
491
451
@pytest .mark .parametrize ("max_size" , [None , 34 , 40 , 1000 ])
492
452
@pytest .mark .parametrize ("interpolation" , [BILINEAR , BICUBIC , NEAREST , NEAREST_EXACT ])
493
453
def test_resize (device , dt , size , max_size , interpolation ):
0 commit comments