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

HDv3模型的复现 #336

Open
ZFU123456 opened this issue Aug 16, 2023 · 1 comment
Open

HDv3模型的复现 #336

ZFU123456 opened this issue Aug 16, 2023 · 1 comment

Comments

@ZFU123456
Copy link

flow, mask, merged = self.flownet(torch.cat((imgs, gt), 1), scale=scale, training=training)
loss_l1 = (merged[2] - gt).abs().mean()
loss_smooth = self.sobel(flow[2], flow[2]*0).mean()
# loss_vgg = self.vgg(merged[2], gt)
if training:
self.optimG.zero_grad()
loss_G = loss_cons + loss_smooth * 0.1
loss_G.backward()
self.optimG.step()
else:
flow_teacher = flow[2]
return merged[2], {
'mask': mask,
'flow': flow[2][:, :2],
'loss_l1': loss_l1,
'loss_cons': loss_cons,
'loss_smooth': loss_smooth,
}
想问您使用的是几个loss?是”loss_l1+loss_cons+loss_smooth“三个loss吗?还是仅仅loss_cons + loss_smooth * 0.1?
还想问下作者,使用HDv3复现插多帧模型的时候,训练并不成功,模型的psnr值为2.多,是什么原因呢?

@hzwer
Copy link
Owner

hzwer commented Aug 23, 2023

Hi,我用的是 loss_l1+loss_cons*0.01+loss_vgg(可选);psnr这么低的情况下,是不是有可能数据喂错了
你可以只用 l1 loss跑通再试别的

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