Skip to content

Commit c33e9af

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Fix adjust_hue on ARM
Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: vmoens Differential Revision: D68021972 fbshipit-source-id: b8b6bc90a494467f7dda446ade7e175d21221c02
1 parent 61e0390 commit c33e9af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/transforms/_functional_pil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def adjust_hue(img: Image.Image, hue_factor: float) -> Image.Image:
110110

111111
np_h = np.array(h, dtype=np.uint8)
112112
# This will over/underflow, as desired
113-
np_h += np.array(hue_factor * 255).astype(np.uint8)
113+
np_h += np.int32(hue_factor * 255).astype(np.uint8)
114114

115115
h = Image.fromarray(np_h, "L")
116116

0 commit comments

Comments
 (0)