eGitty

Discover The Most Popular Algorithms

Steps to Convert a Scalar or Number to Vector in Deep Learning

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:

Steps to Convert a Scalar or Number to Vector in Deep Learning

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:

Example to Convert a Scalar or Number to Vector in Deep Learning

Leave a Reply

Your email address will not be published. Required fields are marked *