rubenwiersma / hsn

Code for SIGGRAPH paper CNNs on Surfaces using Rotation-Equivariant Features
MIT License
87 stars 15 forks source link

Non-finite matrix entry #2

Open pvnieo opened 4 years ago

pvnieo commented 4 years ago

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!

rubenwiersma commented 4 years ago

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.