You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test test_adjust_saturation creates an image from a small array and calls torchvision.transorms.functional.adjust_saturation to adjust the saturation to a couple different levels (0.5 and 2), and then compares the result to some hard-coded expected values.
Torchvision's adjust_saturation routine relies on PIL.ImageEnhance to do the actual work.
The results from pillow's implementation of that routine has changed between pillow 6.2.1 and 7.0.0 (at least in Anaconda's pre-built pillow packages):
Note the differences in the final 3 values between v6 and v7:
133 215 88 vs 133 216 89, and
4 255 0 vs 3 255 0
The output from the newer pillow version no longer matches the hard-coded values in the test, and so the test fails.
This problem is seen on both x86_64 and ppc64le.
Possible solutions migtht be any of:
carry canned values for each of pillow v6 and v7
choose an input with stable outputs across both versions
relax the allclose assertion to atol=1 to allow for slight differences due to rounding (i.e. to allow 1 least significant bit of difference, since these are uint8 quantities)
The text was updated successfully, but these errors were encountered:
Test
test_adjust_saturation
creates an image from a small array and callstorchvision.transorms.functional.adjust_saturation
to adjust the saturation to a couple different levels (0.5 and 2), and then compares the result to some hard-coded expected values.Torchvision's
adjust_saturation
routine relies onPIL.ImageEnhance
to do the actual work.The results from
pillow
's implementation of that routine has changed between pillow 6.2.1 and 7.0.0 (at least in Anaconda's pre-built pillow packages):Note the differences in the final 3 values between v6 and v7:
133 215 88
vs133 216 89
, and4 255 0
vs3 255 0
The output from the newer pillow version no longer matches the hard-coded values in the test, and so the test fails.
This problem is seen on both x86_64 and ppc64le.
Possible solutions migtht be any of:
allclose
assertion toatol=1
to allow for slight differences due to rounding (i.e. to allow 1 least significant bit of difference, since these are uint8 quantities)The text was updated successfully, but these errors were encountered: