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

超分辨率训练时,参数要和保存的扩散模型训练好的模型参数一致吗? #92

Open
4C4247 opened this issue Oct 18, 2024 · 4 comments
Labels
question Further information is requested resolved Have been resolved

Comments

@4C4247
Copy link

4C4247 commented Oct 18, 2024

Traceback (most recent call last):
File "G:\foxdownload\Integrated-Design-Diffusion-Model-main\sr\train.py", line 386, in
main(args)
File "G:\foxdownload\Integrated-Design-Diffusion-Model-main\sr\train.py", line 297, in main
train(args=args)
File "G:\foxdownload\Integrated-Design-Diffusion-Model-main\sr\train.py", line 143, in train
start_epoch = load_ckpt(ckpt_path=ckpt_path, model=model, device=device, optimizer=optimizer,
File "G:\foxdownload\Integrated-Design-Diffusion-Model-main\ut\checkpoint.py", line 57, in load_ckpt
load_model_ckpt(model=model, model_ckpt=ckpt_model, is_train=is_train, is_pretrain=is_pretrain,
File "G:\foxdownload\Integrated-Design-Diffusion-Model-main\ut\checkpoint.py", line 117, in load_model_ckpt
model_weights_dict = {k: v for k, v in model_weights_dict.items() if np.shape(model_dict[k]) == np.shape(v)}
File "G:\foxdownload\Integrated-Design-Diffusion-Model-main\ut\checkpoint.py", line 117, in
model_weights_dict = {k: v for k, v in model_weights_dict.items() if np.shape(model_dict[k]) == np.shape(v)}
KeyError: 'inc.double_conv.0.weight'

我的数据集是130*130的图片格式,貌似不是32的倍数。模型要重新训练吗? 谢谢

@chairc
Copy link
Owner

chairc commented Oct 22, 2024

需要时32的倍数,例如128,目前还没有提供超分模型,等后期提供超分算法的预训练模型。

@chairc chairc added question Further information is requested resolved Have been resolved labels Oct 22, 2024
@4C4247
Copy link
Author

4C4247 commented Oct 22, 2024

意思也就是说,我如果现在用130×130跑sr/train.py的话应该是没有效果的对莫。好的,期待您的预训练模型QAQ

@chairc
Copy link
Owner

chairc commented Oct 22, 2024

不是没有效果,可能会在卷积的时候出错,因为130/2=65,65是奇数,再进行除法操作,后期在上采样的过程中concat有可能出错。所以尽量使用2的倍数。

@4C4247
Copy link
Author

4C4247 commented Oct 22, 2024

好的好的,明白了。谢谢你!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested resolved Have been resolved
Projects
None yet
Development

No branches or pull requests

2 participants