-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Given groups=1, weight of size [16, 2, 5, 5, 5], expected input[1, 1, 32, 32, 32] to have 2 channels, but got 1 channels instead #10
Comments
Hi, I also encountered the same error as you. |
Hi
Hi, I met the same error too. Did you solve it? |
Hi,i also met the same problem.Did you slove it?? |
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 219, in validation_step
return self.model.validation_step(*args, **kwargs)
File "/home/mtc206/0qsw/SSL4MIS-master/code/3D-UCaps/3D-UCaps-main/module/segcaps.py", line 203, in validation_step
overlap=self.overlap,
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/monai/inferers/utils.py", line 130, in sliding_window_inference
seg_prob = predictor(window_data, *args, **kwargs).to(device) # batched patch segmentation
File "/home/mtc206/0qsw/SSL4MIS-master/code/3D-UCaps/3D-UCaps-main/module/segcaps.py", line 124, in forward
x = self.feature_extractor(x)
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/mtc206/anaconda3/envs/lcj/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 573, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [16, 2, 5, 5, 5], expected input[1, 1, 32, 32, 32] to have 2 channels, but got 1 channels instead
when running the code,how can i input the data with 2 channels?
The text was updated successfully, but these errors were encountered: