@@ -5256,11 +5256,8 @@ def test_image_functional_correctness(self, coefficients, interpolation, fill, m
52565256 image , startpoints = None , endpoints = None , coefficients = coefficients , interpolation = interpolation , fill = fill
52575257 )
52585258 if make_input is make_image_cvcuda :
5259- actual = F .cvcuda_to_tensor (actual ).to (device = "cpu" )
5260- actual = actual .squeeze (0 )
5261- # drop the batch dimension
5262- image = F .cvcuda_to_tensor (image ).to (device = "cpu" )
5263- image = image .squeeze (0 )
5259+ actual = cvcuda_to_pil_compatible_tensor (actual )
5260+ image = cvcuda_to_pil_compatible_tensor (image )
52645261
52655262 expected = F .to_image (
52665263 F .perspective (
@@ -5286,7 +5283,7 @@ def test_image_functional_correctness(self, coefficients, interpolation, fill, m
52865283 # visually the results are the same on real images,
52875284 # realistically, the diff is not visible to the human eye
52885285 tolerance = 255 if interpolation is transforms .InterpolationMode .NEAREST else 125
5289- torch . testing . assert_close (actual , expected , rtol = 0 , atol = tolerance )
5286+ assert_close (actual , expected , rtol = 0 , atol = tolerance )
52905287
52915288 def _reference_perspective_bounding_boxes (self , bounding_boxes , * , startpoints , endpoints ):
52925289 format = bounding_boxes .format
0 commit comments