Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Fixed bug after contrib merging

Dmytro Mishkin8b9ce2d3177e
diff --git a/kornia/contrib/spatial_soft_argmax2d.py b/kornia/contrib/spatial_soft_argmax2d.py
index e1ee16094..2f5d1585e 100644
--- a/kornia/contrib/spatial_soft_argmax2d.py
+++ b/kornia/contrib/spatial_soft_argmax2d.py
@@ -1,7 +1,8 @@
import torch
import torch.nn as nn
-import kornia.contrib.dsnt as dsnt
+from kornia.contrib.dsnt import (spatial_softmax_2d,
+ spatial_softargmax_2d)
def spatial_soft_argmax2d(
@@ -35,9 +36,9 @@ def spatial_soft_argmax2d(
>>> coords = kornia.spatial_soft_argmax2d(input, False)
tensor([[[1.0000, 1.0000]]])
"""
- input_soft: torch.Tensor = dsnt.spatial_softmax_2d(input, temperature)
- output: torch.Tensor = dsnt.spatial_softargmax_2d(input_soft,
- normalized_coordinates)
+ input_soft: torch.Tensor = spatial_softmax_2d(input, temperature)
+ output: torch.Tensor = spatial_softargmax_2d(input_soft,
+ normalized_coordinates)
return output