mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Fixed compilation issues with libtorch 1.4.0
This commit is contained in:
@@ -215,7 +215,7 @@ cv::Mat SPDetector::compute(const std::vector<cv::KeyPoint> &keypoints)
|
||||
grid[0][0].slice(1, 0, 1) = 2.0 * fkpts.slice(1, 1, 2) / prob_.size(1) - 1; // x
|
||||
grid[0][0].slice(1, 1, 2) = 2.0 * fkpts.slice(1, 0, 1) / prob_.size(0) - 1; // y
|
||||
|
||||
auto desc = torch::grid_sampler(desc_, grid, 0, 0); // [1, 256, 1, n_keypoints]
|
||||
auto desc = torch::grid_sampler(desc_, grid, 0, 0, true); // [1, 256, 1, n_keypoints]
|
||||
desc = desc.squeeze(0).squeeze(1); // [256, n_keypoints]
|
||||
|
||||
// normalize to 1
|
||||
|
||||
Reference in New Issue
Block a user