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

run the generate_blur.py ocur and i got a error #11

Open
alexHxun opened this issue Sep 28, 2021 · 1 comment
Open

run the generate_blur.py ocur and i got a error #11

alexHxun opened this issue Sep 28, 2021 · 1 comment

Comments

@alexHxun
Copy link

generate_blur.py:30: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
opt = yaml.load(f)["KernelWizard"]
Sample #0/10
Traceback (most recent call last):
File "generate_blur.py", line 53, in
main()
File "generate_blur.py", line 45, in main
LQ_tensor = model.adaptKernel(HQ_tensor, kernel)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\kernel_encoding\kernel_wizard.py", line 157, in adaptKernel
out = self.adapter(x_sharp, kernel)
File "C:\Users\Xun.Huang\Anaconda3\envs\pytorch-env\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\kernel_encoding\kernel_wizard.py", line 99, in forward
return self.model(x, k)
File "C:\Users\Xun.Huang\Anaconda3\envs\pytorch-env\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\backbones\unet_parts.py", line 103, in forward
return self.up(self.submodule(self.down(x), noise))
File "C:\Users\Xun.Huang\Anaconda3\envs\pytorch-env\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\backbones\unet_parts.py", line 109, in forward
return torch.cat((self.up(self.submodule(self.down(x), noise)), x), dim=1)
File "C:\Users\Xun.Huang\Anaconda3\envs\pytorch-env\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\backbones\unet_parts.py", line 109, in forward
return torch.cat((self.up(self.submodule(self.down(x), noise)), x), dim=1)
File "C:\Users\Xun.Huang\Anaconda3\envs\pytorch-env\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\backbones\unet_parts.py", line 109, in forward
return torch.cat((self.up(self.submodule(self.down(x), noise)), x), dim=1)
File "C:\Users\Xun.Huang\Anaconda3\envs\pytorch-env\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Xun.Huang\blur-kernel-space-exploring\models\backbones\unet_parts.py", line 107, in forward
return torch.cat((self.up(torch.cat((self.down(x), noise), dim=1)), x), dim=1)
RuntimeError: torch.cat(): Sizes of tensors must match except in dimension 1. Got 4 and 2 in dimension 2 (The offending index is 1)

the pre-trained model file is GOPRO_wVAE . anyone can help me? Should i change the dim=1 to dim=2?

@yueyue466
Copy link

hello,where you find pre-trained model file is GOPRO_wVAE?

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

2 participants