@@ -1711,8 +1711,6 @@ def test_antialias_warning():
17111711    tensor_video  =  torch .randint (0 , 256 , size = (2 , 3 , 10 , 10 ), dtype = torch .uint8 )
17121712
17131713    match  =  "The default value of the antialias parameter" 
1714-     with  pytest .warns (UserWarning , match = match ):
1715-         transforms .Resize ((20 , 20 ))(tensor_img )
17161714    with  pytest .warns (UserWarning , match = match ):
17171715        transforms .RandomResizedCrop ((20 , 20 ))(tensor_img )
17181716    with  pytest .warns (UserWarning , match = match ):
@@ -1722,18 +1720,6 @@ def test_antialias_warning():
17221720    with  pytest .warns (UserWarning , match = match ):
17231721        transforms .RandomResize (10 , 20 )(tensor_img )
17241722
1725-     with  pytest .warns (UserWarning , match = match ):
1726-         transforms .functional .resize (tensor_img , (20 , 20 ))
1727-     with  pytest .warns (UserWarning , match = match ):
1728-         transforms .functional .resize_image_tensor (tensor_img , (20 , 20 ))
1729- 
1730-     with  pytest .warns (UserWarning , match = match ):
1731-         transforms .functional .resize (tensor_video , (20 , 20 ))
1732-     with  pytest .warns (UserWarning , match = match ):
1733-         transforms .functional .resize_video (tensor_video , (20 , 20 ))
1734- 
1735-     with  pytest .warns (UserWarning , match = match ):
1736-         datapoints .Image (tensor_img ).resize ((20 , 20 ))
17371723    with  pytest .warns (UserWarning , match = match ):
17381724        datapoints .Image (tensor_img ).resized_crop (0 , 0 , 10 , 10 , (20 , 20 ))
17391725
@@ -1744,27 +1730,17 @@ def test_antialias_warning():
17441730
17451731    with  warnings .catch_warnings ():
17461732        warnings .simplefilter ("error" )
1747-         transforms .Resize ((20 , 20 ))(pil_img )
17481733        transforms .RandomResizedCrop ((20 , 20 ))(pil_img )
17491734        transforms .ScaleJitter ((20 , 20 ))(pil_img )
17501735        transforms .RandomShortestSize ((20 , 20 ))(pil_img )
17511736        transforms .RandomResize (10 , 20 )(pil_img )
1752-         transforms .functional .resize (pil_img , (20 , 20 ))
17531737
1754-         transforms .Resize ((20 , 20 ), antialias = True )(tensor_img )
17551738        transforms .RandomResizedCrop ((20 , 20 ), antialias = True )(tensor_img )
17561739        transforms .ScaleJitter ((20 , 20 ), antialias = True )(tensor_img )
17571740        transforms .RandomShortestSize ((20 , 20 ), antialias = True )(tensor_img )
17581741        transforms .RandomResize (10 , 20 , antialias = True )(tensor_img )
17591742
1760-         transforms .functional .resize (tensor_img , (20 , 20 ), antialias = True )
1761-         transforms .functional .resize_image_tensor (tensor_img , (20 , 20 ), antialias = True )
1762-         transforms .functional .resize (tensor_video , (20 , 20 ), antialias = True )
1763-         transforms .functional .resize_video (tensor_video , (20 , 20 ), antialias = True )
1764- 
1765-         datapoints .Image (tensor_img ).resize ((20 , 20 ), antialias = True )
17661743        datapoints .Image (tensor_img ).resized_crop (0 , 0 , 10 , 10 , (20 , 20 ), antialias = True )
1767-         datapoints .Video (tensor_video ).resize ((20 , 20 ), antialias = True )
17681744        datapoints .Video (tensor_video ).resized_crop (0 , 0 , 10 , 10 , (20 , 20 ), antialias = True )
17691745
17701746
0 commit comments