Skip to content

Commit 8a82017

Browse files
sanketsansdatumbox
andauthored
fixed Gamma casting (#3472)
* fixed origin head * fixed inconsistent casting * updated functional_tensor.py Modified the .to() method to convert_image_dtype() method. * Apply suggestions from code review Co-authored-by: Vasilis Vryniotis <[email protected]>
1 parent f637c63 commit 8a82017

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

torchvision/transforms/functional_tensor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor:
227227
result = (gain * result ** gamma).clamp(0, 1)
228228

229229
result = convert_image_dtype(result, dtype)
230-
result = result.to(dtype)
231230
return result
232231

233232

0 commit comments

Comments
 (0)