hsn icon indicating copy to clipboard operation
hsn copied to clipboard

Non-finite matrix entry

Open pvnieo opened this issue 3 years ago • 1 comments

Hi,

Thanks for the great contribution and for sharing the code.

I'm using HSN for segmentation (I'm using my own dataset). I had this error while doing preprocessing:

File "/hsn/datasets/shape_seg2.py", line 76, in process
    data = self.pre_transform(data)
  File "/path/site-packages/torch_geometric/transforms/compose.py", line 14, in __call__
    data = t(data)
  File "/hsn/transforms/multiscale_radius_graph.py", line 93, in __call__
    pool_neigh = torch.from_numpy(vh.nearest(pos_vh, face_vh, idx_vh, labels_vh)).round().long().clamp(0, pool_idx.size(0) - 1).view(-1)
RuntimeError: checkFinite() failure: Non-finite matrix entry [2441,2441] = -nan

It's an error related to vector_heat, do have an idea why this happening, and how can I solve it?

Thank you in advance!

pvnieo avatar Nov 13 '20 22:11 pvnieo

I wouldn't know what would be the exact issue. What might help to debug is to check your dataset in the vector heat demo project. This way, you can visually see what's going on. If that fails, you could also try a different way to compute nearest neighbours: https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html?highlight=nearest#torch_geometric.nn.pool.nearest

The difference between PyTorch Geometric's nearest neighbours, is that it is computed in R3, whereas the nearest neighbours used by us is computed intrinsically (with geodesic distances). Depending on the shape and distances this doesn't have to be a major problem.

rubenwiersma avatar Nov 15 '20 12:11 rubenwiersma