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

Second attempt at multihead implementation #38

Closed
wants to merge 3 commits into from
Closed

Conversation

stefdoerr
Copy link
Collaborator

No description provided.

@stefdoerr stefdoerr self-assigned this Aug 3, 2021
label_idx = torch.tensor(
[self.head_map[lt] for lt in head_labels], device=x.device
)
idx = torch.zeros_like(batch, device=x.device)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch.zeros_like already makes sure the created tensor is on the same device as the one passed to it but it doesn't really matter here.

@giadefa giadefa deleted the multihead2 branch October 2, 2022 19:32
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

Successfully merging this pull request may close these issues.

None yet

2 participants