Skip to content

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

@alexHxun

Description

@alexHxun

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions