luost26 / DMRDenoise

:snowman: Differentiable Manifold Reconstruction for Point Cloud Denoising (ACM MM 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: size mismatch

tvoesolncee opened this issue · comments

I run your code and pretrained model without any changes to denoise point cloud with 65 536 points. I`ve tried with another number of points in point cloud. I get the following error. Please, could you tell me how i can fix it?

Traceback (most recent call last):
File "denoise.py", line 202, in
auto_denoise(args)
File "denoise.py", line 165, in auto_denoise
expand_knn=args.expand_knn
File "denoise.py", line 82, in run_denoise_middle_pointcloud
den, dow = run_denoise(splpc, patch_size, ckpt, device, random_state, expand_knn)
File "denoise.py", line 53, in run_denoise
pred = model(patch)
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/shared/elejke/olga/3d/DMRDenoise-master/models/denoise.py", line 56, in forward
return self.model(pos)
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/shared/elejke/olga/3d/DMRDenoise-master/models/net.py", line 54, in forward
feats.append(feat_unit(pos))
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/shared/elejke/olga/3d/DMRDenoise-master/models/blocks.py", line 48, in forward
return self.dynamic_graph_forward(x)
File "/root/shared/elejke/olga/3d/DMRDenoise-master/models/blocks.py", line 35, in dynamic_graph_forward
x = self.transformsi
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/shared/elejke/olga/3d/DMRDenoise-master/models/utils.py", line 164, in forward
return self.activation(self.linear(x))
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "/opt/conda/envs/DMRDenoise/lib/python3.6/site-packages/torch/nn/functional.py", line 1612, in linear
output = input.matmul(weight.t())
RuntimeError: size mismatch, m1: [1765 x 6], m2: [3 x 32] at /opt/conda/conda-bld/pytorch_1591914895258/work/aten/src/THC/generic/THCTensorMathBlas.cu:283

Can you provide the xyz file of the point cloud that caused this error?

@luost26 thank you, the problem was in the point cloud file!