Rethinking-Inpainting-MEDFE
Rethinking-Inpainting-MEDFE copied to clipboard
自己训练的模型,无法test,在用continue_train时出现问题
test时,对于模型的加载出现问题
continue_train时,在MEDFN.py中没有引用load_network出现error
Maybe you can modify the code as follows, it works for me.
model.netEN.module.load_state_dict(torch.load("EN.pth")['net'])
model.netDE.module.load_state_dict(torch.load("DE.pth")['net'])
model.netMEDFE.module.load_state_dict(torch.load("MEDFE.pth")['net'])
I change the code and it is correct now
Maybe you can modify the code as follows, it works for me.
model.netEN.module.load_state_dict(torch.load("EN.pth")['net']) model.netDE.module.load_state_dict(torch.load("DE.pth")['net']) model.netMEDFE.module.load_state_dict(torch.load("MEDFE.pth")['net'])
Thank you very much. It's working properly
我更改了代码,现在是正确的 Thank you very much. Your perfect work has greatly promoted my work
您好,我最近也在复现这个代码,但是遇到一些问题,可以和您交流一下吗
您好,我更改了opt里面的参数,但是为什么每次加载opt都会恢复最初始的值
我在训练自己的代码时会报错AttributeError: 'Tensor' object has no attribute 'bool'
请问是什么原因啊,非常感谢
请问测试的时候不是应该只需要MASK吗,为什么test,py里三种图都用了
他只是方便了数据加载,其实你看那部分源码就是只用了mask和原始图像的数据
---原始邮件--- 发件人: @.> 发送时间: 2021年7月21日(周三) 下午3:20 收件人: @.>; 抄送: @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
请问测试的时候不是应该只需要MASK吗,为什么test,py里三种图都用了
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
请问为什么还要用原始图像,直接输入MASK不就应该能得到去遮挡的图吗
------------------ 原始邮件 ------------------ 发件人: "KumapowerLIU/Rethinking-Inpainting-MEDFE" @.>; 发送时间: 2021年7月21日(星期三) 下午3:30 @.>; @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
他只是方便了数据加载,其实你看那部分源码就是只用了mask和原始图像的数据
---原始邮件--- 发件人: @.> 发送时间: 2021年7月21日(周三) 下午3:20 收件人: @.>; 抄送: @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
请问测试的时候不是应该只需要MASK吗,为什么test,py里三种图都用了
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
我说的原始图像就是待修复图像,mask是黑白图像,白色区域是标注的区域
---原始邮件--- 发件人: @.> 发送时间: 2021年7月21日(周三) 下午3:32 收件人: @.>; 抄送: @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
请问为什么还要用原始图像,直接输入MASK不就应该能得到去遮挡的图吗
------------------ 原始邮件 ------------------ 发件人: "KumapowerLIU/Rethinking-Inpainting-MEDFE" @.>; 发送时间: 2021年7月21日(星期三) 下午3:30 @.>; @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
他只是方便了数据加载,其实你看那部分源码就是只用了mask和原始图像的数据
---原始邮件---
发件人: @.>
发送时间: 2021年7月21日(周三) 下午3:20
收件人: @.>;
抄送: @.@.>;
主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
请问测试的时候不是应该只需要MASK吗,为什么test,py里三种图都用了
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
明白了,是我弄错了,万分感谢!!!
------------------ 原始邮件 ------------------ 发件人: "KumapowerLIU/Rethinking-Inpainting-MEDFE" @.>; 发送时间: 2021年7月21日(星期三) 下午3:43 @.>; @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
我说的原始图像就是待修复图像,mask是黑白图像,白色区域是标注的区域
---原始邮件--- 发件人: @.> 发送时间: 2021年7月21日(周三) 下午3:32 收件人: @.>; 抄送: @.@.>; 主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
请问为什么还要用原始图像,直接输入MASK不就应该能得到去遮挡的图吗
------------------ 原始邮件 ------------------
发件人: "KumapowerLIU/Rethinking-Inpainting-MEDFE" @.>;
发送时间: 2021年7月21日(星期三) 下午3:30
@.>;
@.@.>;
主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
他只是方便了数据加载,其实你看那部分源码就是只用了mask和原始图像的数据
---原始邮件---
发件人: @.>
发送时间: 2021年7月21日(周三) 下午3:20
收件人: @.>;
抄送: @.@.>;
主题: Re: [KumapowerLIU/Rethinking-Inpainting-MEDFE] 自己训练的模型,无法test,在用continue_train时出现问题 (#12)
请问测试的时候不是应该只需要MASK吗,为什么test,py里三种图都用了
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
@GuoJingWeng @fxcdl 你们好,我也对这里输出结果的获取有些疑问,在test.py里还是用到了detail图像,也就是gt图像: fake_out = fake_out.detach().cpu() * mask + detail*(1-mask) 这里要怎么解释?