π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
fix reshape for depth2normals
Dmytro Mishkin0830117620a6
diff --git a/kornia/filters/sobel.py b/kornia/filters/sobel.pyindex c0f89550e..f5ab2991a 100644--- a/kornia/filters/sobel.py+++ b/kornia/filters/sobel.py@@ -61,7 +61,7 @@ class SpatialGradient(nn.Module):self.kernel.size(2) // 2,self.kernel.size(2) // 2]out_channels: int = 3 if self.order == 2 else 2- padded_inp: torch.Tensor = F.pad(input.view(b * c, 1, h, w), spatial_pad, 'replicate')[:, :, None]+ padded_inp: torch.Tensor = F.pad(input.reshape(b * c, 1, h, w), spatial_pad, 'replicate')[:, :, None]return F.conv3d(padded_inp, kernel_flip, padding=0).view(b, c, out_channels, h, w)