So I am little confused with the implementation of positional embedding by PyTorch here
Let’s say I have an embedding of dimension 10 and I have 14 such embeddings. So my matrix will be something like (14X10). Now, if I want to get positional embedding of this matrix, I create an object and find the position embedding like this:
embed = PositionalEncoding(d_model=1)
res = embed(data)

but when I look at the shape, it’s this
print(res.shape)


torch.Size([10, 10, 14])

So how do I ensure that I’m using the positional embedding correctly?