Colin97 / MSN-Point-Cloud-Completion

Morphing and Sampling Network for Dense Point Cloud Completion (AAAI2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: module 'MDS' has no attribute 'minimum_density_sampling'

hzxie opened this issue · comments

When I try to train the network, I got the following error.

Namespace(batchSize=16, env='MSN_TRAIN', model='', n_primitives=16, nepoch=25, num_points=8192, workers=24)
Exception in user code:
------------------------------------------------------------
Random Seed:  1957
Train Set Size:  28974
Traceback (most recent call last):
  File "train.py", line 121, in <module>
    output1, output2, emd1, emd2, expansion_penalty  = network(input, gt.contiguous(), 0.005, 50)         
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 83, in parallel_apply
    raise output
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 59, in _worker
    output = module(*input, **kwargs)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "train.py", line 38, in forward
    output1, output2, expansion_penalty = self.model(inputs)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/mnt/lustre/xiehaozhe/Development/MSN-Point-Cloud-Completion/model.py", line 168, in forward
    resampled_idx = MDS_module.minimum_density_sample(xx[:, 0:3, :].transpose(1, 2).contiguous(), out1.shape[1], mean_mst_dis) 
  File "./MDS/MDS_module.py", line 29, in forward
    MDS.minimum_density_sampling(xyz, npoint, mean_mst_length, idx)
AttributeError: module 'MDS' has no attribute 'minimum_density_sampling'

I saw the declaration in MDS.cpp and I have built the extension using:

python setup.py install --user

Could you tell me how to solve this problem?

The problem is solved by rebuilding the extension.