RuntimeError: dets should have the same type as scores
Closed this issue · 3 comments
Envs is installed as required.
0it [00:00, ?it/s]D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\kornia\utils\helpers.py:96: UserWarning: torch.solve is deprecated in favor of torch.linalg.solveand will be removed
in a future PyTorch release.
torch.linalg.solve has its arguments reversed and does not return the LU factorization.
To get the LU factorization see torch.lu, which can be used with torch.lu_solve or torch.lu_unpack.
X = torch.solve(B, A).solution
should be replaced with
X = torch.linalg.solve(A, B) (Triggered internally at ..\aten\src\ATen\native\BatchLinearAlgebra.cpp:760.)
out1, out2 = torch.solve(input.to(dtype), A.to(dtype))
D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change.
Please do not use them for anything important until they are released as stable. (Triggered internally at ..\c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Traceback (most recent call last):
File "train.py", line 139, in
train_eval(model, data_loaders, config)
File "train.py", line 30, in train_eval
raw_outputs = model(data['raw'])
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\experments\SuperPoint-Pytorch-master\SuperPoint-Pytorch-master\model\magic_point.py", line 42, in forward
keep_top_k=self.topk).squeeze(dim=0) for p in prob]
File "D:\experments\SuperPoint-Pytorch-master\SuperPoint-Pytorch-master\model\magic_point.py", line 42, in
keep_top_k=self.topk).squeeze(dim=0) for p in prob]
File "D:\experments\SuperPoint-Pytorch-master\SuperPoint-Pytorch-master\solver\nms.py", line 45, in box_nms
indices = torchvision.ops.nms(boxes=boxes, scores=scores, iou_threshold=iou)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torchvision\ops\boxes.py", line 35, in nms
return torch.ops.torchvision.nms(boxes, scores, iou_threshold)
RuntimeError: dets should have the same type as scores
Have you solve your problem? Please update your repository to the latest version and make sure you have generated the synthetic data set completely. Note that please delete the dir ./data/synthetic_shapes before you regenerate your data.
Thank you for your reply. I think I have solved the problem. But when I trained magicpoint, I encountered new problems as follow.I will try to solve this bug tomorrow, but if you know how to solve it, please let me know.Thanks:
4206it [2:01:14, 1.47s/it]its start training.
4207it [2:01:15, 1.47s/it]its start training.
0it [00:00, ?it/s]Traceback (most recent call last):
File "train.py", line 139, in
train_eval(model, data_loaders, config)
File "train.py", line 60, in train_eval
eval_loss = do_eval(model, dataloader['test'], config, device)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "train.py", line 77, in do_eval
raw_outputs = model(data['raw'])
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\experments\SuperPoint-Pytorch-master\SuperPoint-Pytorch-master\model\magic_point.py", line 32, in forward
feat_map = self.backbone(x['img'])
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\experments\SuperPoint-Pytorch-master\SuperPoint-Pytorch-master\model\modules\cnn\vgg_backbone.py", line 63, in forward
out = self.block1_1(x)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\container.py", line 139, in forward
input = module(input)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\conv.py", line 443, in forward
return self._conv_forward(input, self.weight, self.bias)
File "D:\Users\sichu\anaconda3\envs\point-torch\lib\site-packages\torch\nn\modules\conv.py", line 440, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [64, 1, 3, 3], but got 5-dimensional input of size [16, 1, 1, 120, 160] instead
I know this problem. I think this problem can be solved by update your repo. to the latest version