CVLAB-Unibo / MM2D3D

Official code for the paper "Exploiting the Complementarity of 2D and 3D Networks to Address Domain-Shift in 3D Semantic Segmentation"
10 stars 0 forks source link

RuntimeError: mat1 and mat2 shapes cannot be multiplied (21584x1 and 3x1) #3

Closed Lzyin closed 11 months ago

Lzyin commented 1 year ago

Excuse me, a runtime error is reported when I run the script CUDA_VISIBLE_DEVICES=0,1 python experiments_USA_SING/rgbd_rgbxyz_sigmoid_for_rgb/run.py: RuntimeError: mat1 and mat2 shapes cannot be multiplied (21584x1 and 3x1)

I run thelib/dataset/preprocess_nuscenes_lidarseg.py script to prepare the data.

I check and find that the data shape of data_batch["x"][1] is 21584x1 (located on line 46 of the _experiments_USA_SING/rgbd_rgbxyz_sigmoid_for_rgb/3dnet/model.py file), but the mapping of the linear layer is 3 ->1: mask_rgb = self.linear_rgb_mask(data_batch["x"][1]) self.linear_rgb_mask = nn.Linear(3, 1)

Also, can you clarify the version of the package (e.g. pytorch-lightning, hydra, etc.)?

Thanks for your reply and help!

Lzyin commented 1 year ago

@adricarda I sincerely hope to get your reply.