Skip to content

Conversation

@NOTGOOOOD
Copy link

In PyTorch, it is not possible to directly assign values to a sliced tensor.

It means that line 57-64 in '/models/gt_matches_generation.py' will not work.

Such as:
gt_matches0[cross_check_consistent0][symmetric_dist_ori > positive_threshold] = IGNORE_INDEX

To solve this, I would suggest doing like the following:

gt_matches0_check = gt_matches0[cross_check_consistent0].clone()
gt_matches0_check[symmetric_dist_0 > positive_threshold] = IGNORE_INDEX
gt_matches0.masked_scatter_(cross_check_consistent0, gt_matches0_check)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant