@@ -1711,8 +1711,6 @@ def test_antialias_warning():
1711
1711
tensor_video = torch .randint (0 , 256 , size = (2 , 3 , 10 , 10 ), dtype = torch .uint8 )
1712
1712
1713
1713
match = "The default value of the antialias parameter"
1714
- with pytest .warns (UserWarning , match = match ):
1715
- transforms .Resize ((20 , 20 ))(tensor_img )
1716
1714
with pytest .warns (UserWarning , match = match ):
1717
1715
transforms .RandomResizedCrop ((20 , 20 ))(tensor_img )
1718
1716
with pytest .warns (UserWarning , match = match ):
@@ -1722,18 +1720,6 @@ def test_antialias_warning():
1722
1720
with pytest .warns (UserWarning , match = match ):
1723
1721
transforms .RandomResize (10 , 20 )(tensor_img )
1724
1722
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 ))
1737
1723
with pytest .warns (UserWarning , match = match ):
1738
1724
datapoints .Image (tensor_img ).resized_crop (0 , 0 , 10 , 10 , (20 , 20 ))
1739
1725
@@ -1744,27 +1730,17 @@ def test_antialias_warning():
1744
1730
1745
1731
with warnings .catch_warnings ():
1746
1732
warnings .simplefilter ("error" )
1747
- transforms .Resize ((20 , 20 ))(pil_img )
1748
1733
transforms .RandomResizedCrop ((20 , 20 ))(pil_img )
1749
1734
transforms .ScaleJitter ((20 , 20 ))(pil_img )
1750
1735
transforms .RandomShortestSize ((20 , 20 ))(pil_img )
1751
1736
transforms .RandomResize (10 , 20 )(pil_img )
1752
- transforms .functional .resize (pil_img , (20 , 20 ))
1753
1737
1754
- transforms .Resize ((20 , 20 ), antialias = True )(tensor_img )
1755
1738
transforms .RandomResizedCrop ((20 , 20 ), antialias = True )(tensor_img )
1756
1739
transforms .ScaleJitter ((20 , 20 ), antialias = True )(tensor_img )
1757
1740
transforms .RandomShortestSize ((20 , 20 ), antialias = True )(tensor_img )
1758
1741
transforms .RandomResize (10 , 20 , antialias = True )(tensor_img )
1759
1742
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 )
1766
1743
datapoints .Image (tensor_img ).resized_crop (0 , 0 , 10 , 10 , (20 , 20 ), antialias = True )
1767
- datapoints .Video (tensor_video ).resize ((20 , 20 ), antialias = True )
1768
1744
datapoints .Video (tensor_video ).resized_crop (0 , 0 , 10 , 10 , (20 , 20 ), antialias = True )
1769
1745
1770
1746
0 commit comments