3 ms·
How to "create an embedding" depends a lot on what kind of data you have. Usually, you train a neural network to solve some kind of task with your data. The mo
by johndough 3y ago
How to "create an embedding" depends a lot on what kind of data you have.
Usually, you train a neural network to solve some kind of task with your data. The most common task is probably classification, for example, "Is the animal shown in this image a dog or a cat?" or "Does this text sound happy or sad?".
Once your network is trained, you discard its last layer, which was responsible for classification, and use the output of the second-to-last layer as your embedding vector.
This works because the first few layers of the network have already transformed the data into a generally useful representation, which gets turned into specific classes by the last layer, or can be used as an embedding vector instead.