π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Fixed incorrect check tensor size check (#716)
Andreas Georgiou31192137bdc1
diff --git a/kornia/geometry/transform/imgwarp.py b/kornia/geometry/transform/imgwarp.pyindex eb734a089..33a4f343a 100644--- a/kornia/geometry/transform/imgwarp.py+++ b/kornia/geometry/transform/imgwarp.py@@ -81,7 +81,7 @@ def warp_perspective(src: torch.Tensor, M: torch.Tensor, dsize: Tuple[int, int],raise ValueError("Input src must be a BxCxHxW tensor. Got {}".format(src.shape))- if not (len(M.shape) == 3 or M.shape[-2:] == (3, 3)):+ if not (len(M.shape) == 3 and M.shape[-2:] == (3, 3)):raise ValueError("Input M must be a Bx3x3 tensor. Got {}".format(M.shape))