mit-han-lab / spvnas

[ECCV 2020] Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution
http://spvnas.mit.edu/
MIT License
588 stars 109 forks source link

visualize.py has bugs #90

Closed Jaywxy closed 2 years ago

Jaywxy commented 2 years ago

my environment: python 3.6 pytorch 1.10.2 py3.6_cuda11.1_cudnn8.0.5_0 torchsparse 1.4.0 torchpack 0.3.1

when I run the command python visualize.py,it prompts the following error:

Traceback (most recent call last): File "visualize.py", line 230, in feed_dict = process_point_cloud(pc, label) File "visualize.py", line 39, in process_point_cloud return_inv=True) TypeError: sparse_quantize() got an unexpected keyword argument 'return_inv'

So I went to check the function sparse_quantize in/home/wxy/anaconda3/envs/spvnas/lib/python3.6/site-packages/torchsparse/utils/quantize.py,and I change the parameter return_inv to return_inverse in visualize.py. but it still prompts errors as follows:

Traceback (most recent call last): File "visualize.py", line 230, in feed_dict = process_point_cloud(pc, label) File "visualize.py", line 39, in process_point_cloud return_inverse=True) TypeError: sparse_quantize() takes from 1 to 2 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given

I also refer to https://github.com/mit-han-lab/spvnas/pull/87#issue-1195526345,still haven't solved the problem.

Hope you can give me some help, any help is much appreciated!

zhijian-liu commented 2 years ago

You could refer to this PR (https://github.com/mit-han-lab/spvnas/pull/87), which should fix this bug.

QuasarsZ commented 2 years ago

@Jaywxy Did you solve this problem? I have the same error in File "visualize.py" TypeError: sparse_quantize() takes from 1 to 2 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given.

I copy the code in (#87), but it's still have error.

Hope anyone can help me about this, thanks!!