We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
should
loss = (- targets * log_probs).mean(0).sum() in https://github.com/michuanhaohao/reid-strong-baseline/blob/master/layers/triplet_loss.py#L146
loss = (- targets * log_probs).mean(0).sum()
be supposed to loss = (- targets * log_probs).sum(1).mean()?
loss = (- targets * log_probs).sum(1).mean()
The text was updated successfully, but these errors were encountered:
@AutumnZ-94 Try this. They should be the same
x = torch.randn(32, 64) y1 = x.mean(0).sum() y2 = x.sum(1).mean() assert torch.allclose(y1, y2)
Sorry, something went wrong.
No branches or pull requests
should
loss = (- targets * log_probs).mean(0).sum()
in https://github.com/michuanhaohao/reid-strong-baseline/blob/master/layers/triplet_loss.py#L146be supposed to
loss = (- targets * log_probs).sum(1).mean()
?The text was updated successfully, but these errors were encountered: