π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
fix lint error
edgarriba8f29eff26631
diff --git a/torchgeometry/losses/__init__.py b/torchgeometry/losses/__init__.pyindex c243ff6a6..42d53ba5c 100644--- a/torchgeometry/losses/__init__.py+++ b/torchgeometry/losses/__init__.py@@ -3,4 +3,5 @@ from .ssim import SSIM, ssimfrom .dice import DiceLoss, dice_lossfrom .tversky import TverskyLoss, tversky_lossfrom .focal import FocalLoss, focal_loss-from .depth_smooth import InverseDepthSmoothnessLoss, inverse_depth_smoothness_loss+from .depth_smooth import InverseDepthSmoothnessLoss+from .depth_smooth import inverse_depth_smoothness_lossdiff --git a/torchgeometry/losses/depth_smooth.py b/torchgeometry/losses/depth_smooth.pyindex ab1d3bee3..79e882224 100644--- a/torchgeometry/losses/depth_smooth.py+++ b/torchgeometry/losses/depth_smooth.py@@ -42,7 +42,10 @@ class InverseDepthSmoothnessLoss(nn.Module):assert len(img.shape) == 4, img.shapereturn img[:, :, :-1, :] - img[:, :, 1:, :]- def forward(self, idepth: torch.Tensor, image: torch.Tensor) -> torch.Tensor:+ def forward(+ self,+ idepth: torch.Tensor,+ image: torch.Tensor) -> torch.Tensor:if not torch.is_tensor(idepth):raise TypeError("Input idepth type is not a torch.Tensor. Got {}".format(type(idepth)))