diff --git a/torchvision/transforms/functional_tensor.py b/torchvision/transforms/functional_tensor.py index 69445e6a231..d20d24a8413 100644 --- a/torchvision/transforms/functional_tensor.py +++ b/torchvision/transforms/functional_tensor.py @@ -227,7 +227,6 @@ def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor: result = (gain * result ** gamma).clamp(0, 1) result = convert_image_dtype(result, dtype) - result = result.to(dtype) return result