Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RuntimeError: The size of tensor a (127) must match the size of tensor b (40) at non-singleton dimension 3 #20

Open
shefali1234 opened this issue May 8, 2020 · 0 comments

Comments

@shefali1234
Copy link

if mask is not None:
mask = mask.unsqueeze(1)
scores = scores.masked_fill(mask == 0, -1e9)
scores = F.softmax(scores, dim=-1)

runtime error in scores.masked_fill(mask == 0, -1e9)
Same for this:
x = x + Variable(self.pe[:,:seq_len], requires_grad=False).cuda()
x = x + pe
return self.dropout(x)

Please help

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant