If you only have a scalar or number, how to convert it to be a vector for matrix operation? Paper Attention Is All You Need gives a method.
For example:
Here pos is a number, for example pos = 3. \d_{model}\) is the length of a vector, for example it is 200.
Using this method, we will convert a number to a 1*200 vector.
These vectors may look like: