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 · 5 comments
Open

HDv3模型的复现 #336

ZFU123456 opened this issue Aug 16, 2023 · 5 comments

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跑通再试别的

@apple1986
Copy link

loss_cons

请问这里的loss_cons是什么?谢谢

@hzwer
Copy link
Owner

hzwer commented Jul 1, 2024

@apple1986 是一个 student 向 teacher 学习光流的 loss

@xjjww
Copy link

xjjww commented Jul 1, 2024

@apple1986 是一个 student 向 teacher 学习光流的 loss
怎么没有teacher网络输出和gt之间的loss?

@hzwer
Copy link
Owner

hzwer commented Jul 2, 2024

@xjjww
... 可能这版本偷懒加在 loss_cons 里面了

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

4 participants