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

a issue about negative samples in logits #13

Open
haofuly opened this issue Apr 11, 2024 · 0 comments
Open

a issue about negative samples in logits #13

haofuly opened this issue Apr 11, 2024 · 0 comments

Comments

@haofuly
Copy link

haofuly commented Apr 11, 2024

Thanks for your great work!

logits = torch.cat([sim_pos.view(-1).unsqueeze(1), sim_neg.view(sim_neg.size(0), -1).repeat_interleave(self.horizon, dim=0)], dim=1) / self.temperature

I am not sure why "sim_neg.view(sim_neg.size(0), -1).repeat_interleave(self.horizon, dim=0)" rather than "sim_neg.view(sim_neg.size(0) * sim_neg.size(1), -1)". The number of negative samples corresponding to one positive sample should be (N-1)*8 or H*(N-1)*8?

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