paula_gomez_duran:

So, the first part of your understanding is correct, u, i, and c are different embeddings and unique_uic contains the 101 unique values of all three tensors, which are used to create dense embedding tensors of the shape [101, 64].


To just verify: the [101, 64] shape is defined as [number_of_unique_triplets, embedding_dim]?



 paula_gomez_duran:

If I just get the embeddings of those 101 “nodes” in shape [101,64], what I would like to know is how to come back to the original triplet shapes but instead of stacking indexes, stacking their corresponding embeddings. Thus, just asking how to go from those [101, 64] embeddings to a shape [99, 3, 64] embeddings


That’s a bit tricky, since your first approach would map the triplets to 101 unique indices in the range [0, 100]. However, now you would like to feed each input separately to the embedding layer, which would then need 2698 indices, since all inputs together contain valid values in [0, 2697].
Could you explain the idea a bit more? Note that an embedding layer is basically a lookup table for an integer input. The idea is that “sparse” inputs will be mapped to “dense” outputs.
However, you are currently trying to mix the triplets with the raw indices, which won’t work out of the box, so some mapping might be needed.