Skip to content
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 expected input... to have 28 channels, but got 27 channels instead #14

Closed
ialhashim opened this issue Feb 15, 2022 · 6 comments

Comments

@ialhashim
Copy link

ialhashim commented Feb 15, 2022

I am getting this error on my own test data (with task 008_VRT_videodenoising_DAVIS)

RuntimeError: Given groups=1, weight of size [96, 28, 1, 3, 3], expected input[1, 27, 32, 128, 128] to have 28 channels, but got 27 channels instead

Full stack:
File "C:\Dev\VRT\models\network_vrt.py", line 1395, in forward x = self.conv_first(x.transpose(1, 2)) File "C:\tools\miniconda3\envs\pt\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "C:\tools\miniconda3\envs\pt\lib\site-packages\torch\nn\modules\conv.py", line 590, in forward return self._conv_forward(input, self.weight, self.bias) File "C:\tools\miniconda3\envs\pt\lib\site-packages\torch\nn\modules\conv.py", line 585, in _conv_forward return F.conv3d( RuntimeError: Given groups=1, weight of size [96, 28, 1, 3, 3], expected input[1, 27, 32, 128, 128] to have 28 channels, but got 27 channels instead

@JingyunLiang
Copy link
Owner

We add noises in the network forward() function. Make sure nonblind_denoising == True here:

if self.nonblind_denoising:

@ialhashim
Copy link
Author

I see. So this network is trained on a specific kind of noise correct?

@JingyunLiang
Copy link
Owner

Yes. Following FastDVDNet and PaCNet, we train non-blind denoising models for fair quantitative comparison.

@Gyudori
Copy link

Gyudori commented Feb 21, 2022

So, do we need 4 channel input image for testing denoising?
And if then, where can I get noise-level-map(4th channel) from?

@JingyunLiang
Copy link
Owner

The input is 3 channel. We add noise-level-map as following:

We add noises in the network forward() function. Make sure nonblind_denoising == True here:

if self.nonblind_denoising:

@WEIZHIHONG720
Copy link

I meet new problem:deform_conv2d() takes from 3 to 7 positional arguments but 8 were given !\ @JingyunLiang @Gyudori

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants