π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Remove print factor (#2291)
Julien Denize9477749414e1
diff --git a/kornia/enhance/adjust.py b/kornia/enhance/adjust.pyindex b675f9c97..b6b9582d0 100644--- a/kornia/enhance/adjust.py+++ b/kornia/enhance/adjust.py@@ -343,7 +343,7 @@ def adjust_contrast(image: Tensor, factor: Union[float, Tensor], clip_output: bowhile len(factor.shape) != len(image.shape):factor = factor[..., None]- KORNIA_CHECK(any(factor >= 0), f"Contrast factor must be positive. Got {factor}")+ KORNIA_CHECK(any(factor >= 0), "Contrast factor must be positive.")# Apply contrast factor to each channelimg_adjust: Tensor = image * factor@@ -397,7 +397,7 @@ def adjust_contrast_with_mean_subtraction(image: Tensor, factor: Union[float, Tewhile len(factor.shape) != len(image.shape):factor = factor[..., None]- KORNIA_CHECK(any(factor >= 0), f"Contrast factor must be positive. Got {factor}")+ KORNIA_CHECK(any(factor >= 0), "Contrast factor must be positive.")if image.shape[-3] == 3:img_mean = rgb_to_grayscale(image).mean((-2, -1), True)