SMohammadi89/PointView-GCN

Segmentation fault (core dumped)

Opened this issue · 5 comments

I've tried to run your code:

cd Feature_extraction
python main.py 

But get segmentation fault.

Tried to debug and code crashes on this line:

dist = -2 * torch.matmul(src, dst.permute(0, 2, 1))

I've checked size of tensors and tried to reproduce this error:

import torch


src = torch.randn(1, 512, 3)
dst = torch.randn(1, 1024, 3)
dst_permute = dst.permute(0, 2, 1)
# dist_permute = torch.randn(1, 3, 1024)

print("torch.matmul(src, dst_permute).size()")
print (torch.matmul(src, dst_permute).size())

dist = -2 * torch.matmul(src, dst.permute(0, 2, 1))
print("dist.size()")
print (dist.size())

src = torch.load("src.pt")
dst_permute = torch.load("dst_permute.pt")
dist = -2 * torch.matmul(src, dst_permute)
print("dist.size()")
print (dist.size())

The output:

torch.matmul(src, dst_permute).size()
torch.Size([1, 512, 1024])
dist.size()
torch.Size([1, 512, 1024])
dist.size()
torch.Size([1, 512, 1024])

But it works properly, I thought that it can be caused when matmul is processed with certain data, but I've stored the tensors and loaded them again to test it, but there is no error.

Can you help with this?

Hi, thanks for your interest to our work. This is the problem of PointNet++ on your PC. Please check the requirements of PointNet ++ and install them all. If the problem doesn’t solve, let me know please

Which dependencies to install?
I've tried several from other models that i ran and they work 100% :

  1. https://github.com/SimingYan/IAE/tree/main/src/encoder/pointnet2
  2. https://github.com/diegovalsesia/HyCoRe/tree/main/pointnet2_ops_lib
    None of them do work.

@SMohammadi89 Any suggestions?

Hi, can you please copy past the error here? I have run the code again without any problem!

There is nothing interesting:

root@ea1ad62c4908:~/devel/PointView-GCN/Feature_extraction# python main.py 
  0%|                                                                                                           | 0/183640 [00:00<?, ?it/s]
Segmentation fault (core dumped)

That's all.
You said that you installed dependeces from pointnet2 could you be more specific which dependencies have you installed? I think the problem is in them.