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

关于模型的输出,还有年龄和性别的损失函数 #1

Open
Cong-Wan opened this issue Sep 7, 2022 · 0 comments
Open

关于模型的输出,还有年龄和性别的损失函数 #1

Cong-Wan opened this issue Sep 7, 2022 · 0 comments

Comments

@Cong-Wan
Copy link

Cong-Wan commented Sep 7, 2022

博主你好,我想问下关于这个模型只输出一个x,你是把这个输出当成年龄和性别合集了嘛,那为什么是性别的输出是
logits[:, :2]
然后age的loss计算我没太搞懂为什么是这样算的, 还有总体的loss
` age_loss = torch.sum((logits[:, 2] - ages) ** 2 / weights[torch.clip(logits[:, 2].long() - 15, 0, 57)]) / len(logits)
#age_loss = mse_loss(logits[:, 2], ages)

loss = gender_loss + age_loss * 100`
如果你有空的话可以帮我解答一下嘛。谢谢!
我的邮箱是: [email protected],你也可以在这里回复我!

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

1 participant