@@ -87,19 +87,26 @@ def __init__(
8787 ArgsKwargs ([32 ]),
8888 ArgsKwargs ((32 , 29 )),
8989 ArgsKwargs ((31 , 28 ), interpolation = v2_transforms .InterpolationMode .NEAREST ),
90- ArgsKwargs ((33 , 26 ), interpolation = v2_transforms .InterpolationMode .BICUBIC ),
9190 ArgsKwargs ((30 , 27 ), interpolation = PIL .Image .NEAREST ),
9291 ArgsKwargs ((35 , 29 ), interpolation = PIL .Image .BILINEAR ),
93- ArgsKwargs ((34 , 25 ), interpolation = PIL .Image .BICUBIC ),
9492 NotScriptableArgsKwargs (31 , max_size = 32 ),
9593 ArgsKwargs ([31 ], max_size = 32 ),
9694 NotScriptableArgsKwargs (30 , max_size = 100 ),
9795 ArgsKwargs ([31 ], max_size = 32 ),
9896 ArgsKwargs ((29 , 32 ), antialias = False ),
9997 ArgsKwargs ((28 , 31 ), antialias = True ),
10098 ],
101- # Such a high atol is needed for bicubic mode
102- closeness_kwargs = dict (rtol = 0 , atol = 32 ),
99+ # atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
100+ closeness_kwargs = dict (rtol = 0 , atol = 1 ),
101+ ),
102+ ConsistencyConfig (
103+ v2_transforms .Resize ,
104+ legacy_transforms .Resize ,
105+ [
106+ ArgsKwargs ((33 , 26 ), interpolation = v2_transforms .InterpolationMode .BICUBIC , antialias = True ),
107+ ArgsKwargs ((34 , 25 ), interpolation = PIL .Image .BICUBIC , antialias = True ),
108+ ],
109+ closeness_kwargs = dict (rtol = 0 , atol = 21 ),
103110 ),
104111 ConsistencyConfig (
105112 v2_transforms .CenterCrop ,
@@ -309,14 +316,21 @@ def __init__(
309316 ArgsKwargs (17 , scale = (0.3 , 0.7 )),
310317 ArgsKwargs (25 , ratio = (0.5 , 1.5 )),
311318 ArgsKwargs ((31 , 28 ), interpolation = v2_transforms .InterpolationMode .NEAREST ),
312- ArgsKwargs ((33 , 26 ), interpolation = v2_transforms .InterpolationMode .BICUBIC ),
313319 ArgsKwargs ((31 , 28 ), interpolation = PIL .Image .NEAREST ),
314- ArgsKwargs ((33 , 26 ), interpolation = PIL .Image .BICUBIC ),
315320 ArgsKwargs ((29 , 32 ), antialias = False ),
316321 ArgsKwargs ((28 , 31 ), antialias = True ),
317322 ],
318- # Such a high atol is needed for bicubic mode
319- closeness_kwargs = dict (rtol = 0 , atol = 30 ),
323+ # atol=1 due to Resize v2 is using native uint8 interpolate path for bilinear and nearest modes
324+ closeness_kwargs = dict (rtol = 0 , atol = 1 ),
325+ ),
326+ ConsistencyConfig (
327+ v2_transforms .RandomResizedCrop ,
328+ legacy_transforms .RandomResizedCrop ,
329+ [
330+ ArgsKwargs ((33 , 26 ), interpolation = v2_transforms .InterpolationMode .BICUBIC , antialias = True ),
331+ ArgsKwargs ((33 , 26 ), interpolation = PIL .Image .BICUBIC , antialias = True ),
332+ ],
333+ closeness_kwargs = dict (rtol = 0 , atol = 21 ),
320334 ),
321335 ConsistencyConfig (
322336 v2_transforms .RandomErasing ,
0 commit comments