HAIS
HAIS copied to clipboard
TypeError: forward() takes 6 positional arguments but 7 were given?
@outsidercsy
I tried to run test.py using your pretrained model, but it produced the error:
Traceback (most recent call last):
File "test.py", line 278, in
Is there any suggestion, please?
my environement: pytorch 1.8 cuda 11.2 spcov 1.2 from your suggested link
@outsidercsy I tried to run test.py using your pretrained model, but it produced the error: Traceback (most recent call last): File "test.py", line 278, in test(model, model_fn, data_name, cfg.test_epoch) File "test.py", line 59, in test preds = model_fn(batch, model, epoch) File "HAIS/model/hais/hais.py", line 371, in test_model_fn ret = model(input_, p2v_map, coords_float, coords[:, 0].int(), batch_offsets, epoch, 'test') File "/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/HAIS/model/hais/hais.py", line 265, in forward output = self.input_conv(input) File "/home/khalilullah/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/anaconda3/envs/hais/lib/python3.7/site-packages/spconv/modules.py", line 134, in forward input = module(input) File "/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/anaconda3/envs/hais/lib/python3.7/site-packages/spconv/conv.py", line 199, in forward outids.shape[0], self.algo) TypeError: forward() takes 6 positional arguments but 7 were given
Is there any suggestion, please?
my environement: pytorch 1.8 cuda 11.2 spcov 1.2 from your suggested link
Hi, I have the same problem, do you have a solution?
@outsidercsy I tried to run test.py using your pretrained model, but it produced the error: Traceback (most recent call last): File "test.py", line 278, in test(model, model_fn, data_name, cfg.test_epoch) File "test.py", line 59, in test preds = model_fn(batch, model, epoch) File "HAIS/model/hais/hais.py", line 371, in test_model_fn ret = model(input_, p2v_map, coords_float, coords[:, 0].int(), batch_offsets, epoch, 'test') File "/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/HAIS/model/hais/hais.py", line 265, in forward output = self.input_conv(input) File "/home/khalilullah/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/anaconda3/envs/hais/lib/python3.7/site-packages/spconv/modules.py", line 134, in forward input = module(input) File "/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/anaconda3/envs/hais/lib/python3.7/site-packages/spconv/conv.py", line 199, in forward outids.shape[0], self.algo) TypeError: forward() takes 6 positional arguments but 7 were given Is there any suggestion, please? my environement: pytorch 1.8 cuda 11.2 spcov 1.2 from your suggested link
Hi, I have the same problem, do you have a solution?
Hi, same problem here. My environment is cuda=11.2, cudnn=8.1.1, pytorch=1.8.1+cu111, spconv 1.2 Could it be because that we need to downgrade both spconv and cuda? When I tried to install spconv 1.2 it says that it needs gpu architecture 'compute_86', which leads to higher version of cuda and pytorch. But the suggested pytorch version in requirements.txt is 1.1 But I wonder if there is any ways to deal with this problem without changing the environment?
@outsidercsy I tried to run test.py using your pretrained model, but it produced the error: Traceback (most recent call last): File "test.py", line 278, in test(model, model_fn, data_name, cfg.test_epoch) File "test.py", line 59, in test preds = model_fn(batch, model, epoch) File "HAIS/model/hais/hais.py", line 371, in test_model_fn ret = model(input_, p2v_map, coords_float, coords[:, 0].int(), batch_offsets, epoch, 'test') File "/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/HAIS/model/hais/hais.py", line 265, in forward output = self.input_conv(input) File "/home/khalilullah/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/anaconda3/envs/hais/lib/python3.7/site-packages/spconv/modules.py", line 134, in forward input = module(input) File "/anaconda3/envs/hais/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/anaconda3/envs/hais/lib/python3.7/site-packages/spconv/conv.py", line 199, in forward outids.shape[0], self.algo) TypeError: forward() takes 6 positional arguments but 7 were given Is there any suggestion, please? my environement: pytorch 1.8 cuda 11.2 spcov 1.2 from your suggested link
Hi, I have the same problem, do you have a solution?
Hi, same problem here. My environment is cuda=11.2, cudnn=8.1.1, pytorch=1.8.1+cu111, spconv 1.2 Could it be because that we need to downgrade both spconv and cuda? When I tried to install spconv 1.2 it says that it needs gpu architecture 'compute_86', which leads to higher version of cuda and pytorch. But the suggested pytorch version in requirements.txt is 1.1 But I wonder if there is any ways to deal with this problem without changing the environment?
Because I'm using an Ampere architecture GPU, I must use cuda>11, and therefore spconv1.2 as suggested. However as I traced back the error I found that it has something to do with the functional.py in spconv/spconv. And as I checked the code I realized that it was because I misunderstood the note of using the modified version of functional.py in README.md. That git source of spconv 1.2 provided was already the modified version. However I had replaced the functional.py with the one in spconv 1.0 provided in the original HAIS folder. It was a stupid mistake and as I changed it back the model worked fine.
ha ha, thank you for your reminder, I also replaced the functional.py file of spconv 1.0 before. so stupid