Welcome to the Linux Foundation Forum!

4.0.2 Embeddings: From Categorical to Continuous

Options

On the Lab 1B, we need to declare a variable emb_dim, which according to the Solved file is 3 (emb_dim = 3), also, the dim on the class content is n_dim = 8, and is not even related to anything (is what I understand, correct me if I am wrong), as it looks like doesn't matter what you declare, why embedding_dim on the class Embedding is not optional? or something random?

Answers

  • dvgodoy
    dvgodoy Posts: 6
    Options

    Hi @lzambra ,

    The embedding_dim argument of the class Embedding defines the number of dimensions (that is, how long the embedding vector is going to be). It must be chosen and informed by the user. In the class contents, n_dim=8 is used to illustrate the resulting tensor that is created (which has 8 columns corresponding to this choice).
    In the lab, we use another number (in this case, 3), to keep the model small, but one could use a higher value as well.

Categories

Upcoming Training