🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
fix unused type ignore (#2666)
João Gustavo A. Amorim6ac9a52da2d1
diff --git a/kornia/feature/loftr/utils/coarse_matching.py b/kornia/feature/loftr/utils/coarse_matching.pyindex dd11ca2eb..473866452 100644--- a/kornia/feature/loftr/utils/coarse_matching.py+++ b/kornia/feature/loftr/utils/coarse_matching.py@@ -235,7 +235,7 @@ class CoarseMatching(Module):mconf_gt = torch.zeros(len(data["spv_b_ids"]), device=_device) # set conf of gt paddings to all zerob_ids, i_ids, j_ids, mconf = ( # type: ignore- torch.cat([x[pred_indices], y[gt_pad_indices]], dim=0) # type: ignore[has-type]+ torch.cat([x[pred_indices], y[gt_pad_indices]], dim=0)for x, y in zip([b_ids, data["spv_b_ids"]],[i_ids, data["spv_i_ids"]],diff --git a/kornia/grad_estimator/ste.py b/kornia/grad_estimator/ste.pyindex 52857f3a3..c8ab23189 100644--- a/kornia/grad_estimator/ste.py+++ b/kornia/grad_estimator/ste.py@@ -35,9 +35,7 @@ class STEFunction(Function):"""@staticmethod- def forward( # type: ignore[override]- ctx: Any, input: Tensor, output: Tensor, grad_fn: Optional[Callable[..., Any]] = None- ) -> Tensor:+ def forward(ctx: Any, input: Tensor, output: Tensor, grad_fn: Optional[Callable[..., Any]] = None) -> Tensor:ctx.in_shape = input.shapectx.out_shape = output.shapectx.grad_fn = grad_fn