mmskeleton icon indicating copy to clipboard operation
mmskeleton copied to clipboard

RuntimeError: Given groups=1, weight of size [400, 256, 1, 1], expected input[64, 3, 1, 1] to have 256 channels, but got 3 channels instead

Open trungmanhhuynh opened this issue 5 years ago • 7 comments

I got this error when testing using pre-trained model. Please help ''' mmskl configs/recognition/st_gcn_aaai18/ntu-rgbd-xsub/test.yaml ''' Error: ''' RuntimeError: Given groups=1, weight of size [400, 256, 1, 1], expected input[64, 3, 1, 1] to have 256 channels, but got 3 channels instead '''

trungmanhhuynh avatar May 18 '20 20:05 trungmanhhuynh

Really dont know, but you added --gpus 1 to the command, it will work ''' mmskl configs/recognition/st_gcn_aaai18/ntu-rgbd-xsub/test.yaml --gpus 1 '''

The code does not work properly with multiple gpus ?

trungmanhhuynh avatar May 18 '20 23:05 trungmanhhuynh

Try using single GPU to see : CUDA_VISIBLE_DEVICES=0 mmskl configs/recognition/st_gcn_aaai18/ntu-rgbd-xsub/test.yaml

yosagaf avatar May 19 '20 10:05 yosagaf

@trungmanhhuynh, @yosagaf, This bug is caused by Pytorch 1.5.0. nn.Parameter and nn.DataParallel can not be used together. (Please refer to https://github.com/pytorch/pytorch/issues/36035 for more information) I recommend you to roll back to Pytorch 1.2.0. Please install it by:

# CUDA 9.2
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch

# CUDA 10.0
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch

We will solve this problem in the next version of mmskeleton.

yysijie avatar May 24 '20 14:05 yysijie

Thank you, @yysijie @yosagaf

trungmanhhuynh avatar May 25 '20 21:05 trungmanhhuynh

I wonder have you fixed this problem...? @yysijie

JiabenChen avatar Aug 16 '21 07:08 JiabenChen

Hi yan, do you have any schedule to fix it? @yysijie

TOMMYWHY avatar Mar 07 '22 09:03 TOMMYWHY

Hi yan, the #36035 has been fixed by torch. However, the latest torch(1.11) has the same error.... @yysijie

TOMMYWHY avatar Mar 13 '22 10:03 TOMMYWHY