We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cfb0b7 commit 471a134Copy full SHA for 471a134
torchvision/transforms/functional_pil.py
@@ -119,7 +119,7 @@ def adjust_gamma(
119
120
input_mode = img.mode
121
img = img.convert("RGB")
122
- gamma_map = [(255 + 1 - 1e-3) * gain * pow(ele / 255.0, gamma) for ele in range(256)] * 3
+ gamma_map = [int((255 + 1 - 1e-3) * gain * pow(ele / 255.0, gamma)) for ele in range(256)] * 3
123
img = img.point(gamma_map) # use PIL's point-function to accelerate this part
124
125
img = img.convert(input_mode)
0 commit comments