π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
update sosnet urls (#541)
Edgar Riba393d8ab39d69
diff --git a/kornia/feature/sosnet.py b/kornia/feature/sosnet.pyindex f8310a699..75edd2cc7 100644--- a/kornia/feature/sosnet.py+++ b/kornia/feature/sosnet.py@@ -4,8 +4,8 @@ import torchimport torch.nn as nnurls: Dict[str, str] = dict()-urls["lib"] = "https://github.com/yuruntian/SOSNet/tree/master/sosnet-weights/sosnet-32x32-liberty.pth"-urls["hp_a"] = "https://github.com/yuruntian/SOSNet/tree/master/sosnet-weights//sosnet-32x32-hpatches_a.pth"+urls["lib"] = "https://github.com/yuruntian/SOSNet/tree/master/sosnet-weights/sosnet_32x32_liberty.pth"+urls["hp_a"] = "https://github.com/yuruntian/SOSNet/tree/master/sosnet-weights/sosnet_32x32_hpatches_a.pth"class SOSNet(nn.Module):diff --git a/test/feature/test_sosnet.py b/test/feature/test_sosnet.pyindex c084f75bc..18a162ebb 100644--- a/test/feature/test_sosnet.py+++ b/test/feature/test_sosnet.py@@ -12,14 +12,14 @@ import kornia.testing as utils # test utilsclass TestSOSNet:def test_shape(self, device):inp = torch.ones(1, 1, 32, 32, device=device)- sosnet = SOSNet().to(device)+ sosnet = SOSNet(pretrained=False).to(device)sosnet.eval() # batchnorm with size 1 is not allowed in train modeout = sosnet(inp)assert out.shape == (1, 128)def test_shape_batch(self, device):inp = torch.ones(16, 1, 32, 32, device=device)- sosnet = SOSNet().to(device)+ sosnet = SOSNet(pretrained=False).to(device)out = sosnet(inp)assert out.shape == (16, 128)@@ -27,6 +27,6 @@ class TestSOSNet:def test_gradcheck(self, device):patches = torch.rand(2, 1, 32, 32, device=device)patches = utils.tensor_to_gradcheck_var(patches) # to var- sosnet = SOSNet().to(patches.device, patches.dtype)+ sosnet = SOSNet(pretrained=False).to(patches.device, patches.dtype)assert gradcheck(sosnet, (patches,), eps=1e-4, atol=1e-4,raise_exception=True, )