Step 4 error
Closed this issue · 2 comments
hi, @eric-yyjau great repo.
I got an error in step 4, can you give me a hint? What thing I am doing wrong?
Traceback (most recent call last):
File "train4.py", line 141, in
args.func(config, output_dir, args)
File "train4.py", line 93, in train_joint
train_agent.train()
File "/home/users/jemllerena/Desktop/pytorch-superpoint/Train_model_frontend.py", line 277, in train
loss_out = self.train_val_sample(sample_train, self.n_iter, True)
File "/home/users/jemllerena/Desktop/pytorch-superpoint/Train_model_heatmap.py", line 315, in train_val_sample
**self.desc_params
File "/home/users/jemllerena/Desktop/pytorch-superpoint/utils/loss_functions/sparse_loss.py", line 243, in batch_descriptor_loss_sparse
homographies[i].type(torch.float32), **options)
File "/home/users/jemllerena/Desktop/pytorch-superpoint/utils/loss_functions/sparse_loss.py", line 212, in descriptor_loss_sparse
num_masked_non_matches_per_match=num_masked_non_matches_per_match)
File "/home/users/jemllerena/Desktop/pytorch-superpoint/utils/loss_functions/sparse_loss.py", line 107, in get_non_matches_corr
img_b_mask=None)
File "/home/users/jemllerena/Desktop/pytorch-superpoint/utils/correspondence_tools/correspondence_finder.py", line 261, in create_non_correspondences
diffs_0_flattened = diffs_0.view(-1,1)
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
/superpoint/utils/correspondence_tools/correspondence_finder.py, line 261, in create_non_correspondences
diffs_0_flattened = diffs_0.contiguous().view(-1,1)
diffs_1_flattened = diffs_1.contiguous().view(-1,1)
Hi @Artcs1 ,
Sorry for my late reply. Have you fixed the error? Feel free to submit a pull request if there's some issue.
Thank you.