π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Update kernels.py (#1940)
Farhan Kaa25635dba55
diff --git a/kornia/filters/kernels.py b/kornia/filters/kernels.pyindex 481d1e284..45df30d47 100644--- a/kornia/filters/kernels.py+++ b/kornia/filters/kernels.py@@ -20,7 +20,7 @@ def gaussian(window_size: int, sigma: float) -> torch.Tensor:x = torch.arange(window_size, device=device, dtype=dtype) - window_size // 2if window_size % 2 == 0:x = x + 0.5- gauss = torch.exp(-x.pow(2.0) / (2 * sigma**2))+ gauss = torch.exp(-(x**2.0) / (2 * sigma**2))return gauss / gauss.sum()