Skip to content

Commit

Permalink
Fix adjust_hue on ARM
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Hug <[email protected]>
  • Loading branch information
sclarkson and NicolasHug authored Oct 14, 2024
1 parent ed55b03 commit a7f0d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchvision/transforms/_functional_pil.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def adjust_hue(img: Image.Image, hue_factor: float) -> Image.Image:

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

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

Expand Down

0 comments on commit a7f0d25

Please sign in to comment.