Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Autopep

Pau Riba4e2b8c2d39b7
diff --git a/kornia/color/adjust.py b/kornia/color/adjust.py
index 64ba83034..e549b61db 100644
--- a/kornia/color/adjust.py
+++ b/kornia/color/adjust.py
@@ -11,7 +11,7 @@ class AdjustBrightness(nn.Module):
image (torch.Tensor): Image to be adjusted.
brightness_factor (torch.Tensor): Brightness adjust factor per element
in the batch. 0 generates a compleatly black image, 1 does not modify
- the input image while any other non-negative number modify the
+ the input image while any other non-negative number modify the
brightness by this factor.
Returns:
@@ -38,7 +38,7 @@ def adjust_brightness(image: torch.Tensor,
image (torch.Tensor): Image to be adjusted.
brightness_factor (torch.Tensor): Brightness adjust factor per element
in the batch. 0 generates a compleatly black image, 1 does not modify
- the input image while any other non-negative number modify the
+ the input image while any other non-negative number modify the
brightness by this factor.
Returns:
@@ -53,7 +53,6 @@ def adjust_brightness(image: torch.Tensor,
raise ValueError("Input size must have a shape of (*, H, W). Got {}"
.format(image.shape))
-
if (brightness_factor < torch.zeros(1)).any():
raise ValueError("Brightness factor must be non-negative. Got {}"
.format(brightness_factor))
diff --git a/test/color/test_adjust.py b/test/color/test_adjust.py
index 7951327ce..5956f22cd 100644
--- a/test/color/test_adjust.py
+++ b/test/color/test_adjust.py
@@ -75,7 +75,6 @@ class TestAdjustColor:
assert_allclose(f(data, 2), expected)
-
def test_adjust_bightness_factor_tensor(self):
# prepare input data
data = torch.tensor([[[1., 1.],
@@ -86,7 +85,7 @@ class TestAdjustColor:
[[.25, .25],
[.25, .25]],
-
+
[[.5, .5],
[.5, .5]]]) # 4x2x2
@@ -98,7 +97,7 @@ class TestAdjustColor:
[[.375, .375],
[.375, .375]],
-
+
[[1., 1.],
[1., 1.]]]) # 4x2x2