Closed adrianezquerro closed 3 years ago
I do not test with other version of spconv. Can you try with spconv==1.2.1?
I do not test with other version of spconv. Can you try with spconv==1.2.1?
Yeah, running 1.2.1 solve the problem.
Thank you
The problem is that in new versions of spconv
, some modules are moved from the spconv.
path to spconv.pytorch.conv.
, such as SubMConv3d
, SparseConv3d
, etc.
So, a new solution:
Change spconv.SubMConv3d
to spconv.pytorch.conv.SubMConv3d
, SparseConv3d
and other modules are similar.
Of course, import spconv
also needs to be changed to import spconv.pytorch.conv
I tested it successfully in version 2.1.2.
More detail: https://github.com/traveller59/spconv/blob/master/docs/SPCONV_2_BREAKING_CHANGEs.md
Sorry to bother @Ryyyc . I encountered an assertion error(assert my_model_dict[k].shape == value.shape') when I use 2.1.2. I tried to print the shape info as print("model shape:{}, pre shape:{}".format(str(my_model_dict[k].shape), str(value.shape)))
The result is: model shape:torch.Size([32, 1, 3, 3, 32]), pre shape:torch.Size([1, 3, 3, 32, 32])
I tried to modified as 'my_model_dict[k] = my_model_dict[k].transpose(0, 1).transpose(1, 2).transpose(2, 3).transpose(3, 4)' however, some sample still produce error as: model shape:torch.Size([3, 3, 3, 512, 256]), pre shape:torch.Size([3, 3, 3, 512, 512])
I want to know whether it is caused by the spconv version or the Cylinder. looking forward to your reply, thanks again
Sorry to bother @Ryyyc . I encountered an assertion error(assert my_model_dict[k].shape == value.shape') when I use 2.1.2. I tried to print the shape info as print("model shape:{}, pre shape:{}".format(str(my_model_dict[k].shape), str(value.shape)))
The result is: model shape:torch.Size([32, 1, 3, 3, 32]), pre shape:torch.Size([1, 3, 3, 32, 32])
I tried to modified as 'my_model_dict[k] = my_model_dict[k].transpose(0, 1).transpose(1, 2).transpose(2, 3).transpose(3, 4)' however, some sample still produce error as: model shape:torch.Size([3, 3, 3, 512, 256]), pre shape:torch.Size([3, 3, 3, 512, 512])
I want to know whether it is caused by the spconv version or the Cylinder. looking forward to your reply, thanks again
@zhouyuchen01 From your description, I'm guessing you're migrating model weights from spconv1.x to spconv2.x. I think you can refer to the change in spconv weight layout at
https://github.com/traveller59/spconv/blob/master/docs/SPCONV_2_BREAKING_CHANGEs.md
weight layout has been changed to RSKC (native algorithm) or KRSC (implicit gemm), no longer RSCK (spconv 1.x). RS is kernel size, C is input channel, K is output channel.
Of course, first you should make sure that your model hyperparameter settings are the same the pre-trained model, and secondly, you should only change the weights of the spconv module, and should not include other modules.
@Ryyyc Thanks for your suggestion as well as your kind help.
@ZhouYC-X sorry to bother. Have you successfully reproduce on spconv2.x, using the given weight?
Hi everyone!
I am trying to run this project, and I'm locked. I try to run the project after installing all the necessary modules, which I will indicate later, and I only receive this error. I have tried to change the version of cuda, (11.1, 11.4, 11.5), install drivers, run from ubuntu, and I always get this error:
I am using python 3.8.0, and a virtual environment Requirements; Yaml 6.0 Cython 0.29.24 Pytorch 1.8.1+cu111 Torch-scatter 2.0.9 Spconv 2.0.2-cu114 nuscenes-devkit 1.1.9
I greatly appreciate if someone can contact me and help me with this error.