Skip to content
Snippets Groups Projects
Commit 62c4b4ee authored by Caroline DE POURTALES's avatar Caroline DE POURTALES
Browse files

concatenation works

parent f10db470
No related branches found
No related tags found
2 merge requests!6Linker with transformer,!5Linker with transformer
......@@ -21,5 +21,5 @@ class PositionalEncoding(nn.Module):
Args:
x: Tensor, shape [batch_size,seq_len, embedding_dim]
"""
x = x + self.pe[:x.size(0)]
x = x + self.pe[:, :x.size(1)]
return self.dropout(x)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment