Creating embeddings from scratch

Can you please confirm if this is the way to create embeddings?

  • For each feature which is categorical we create a separate model. For example if feature-1 has a cardinality of 50, and we want 10 embeddings from it, we create a neural network with 10 neurons and train it on dependent variable.
    To get the embedding of unique_value_1 from feature-1 we pass the one hot encoded form of unique_value_1 to the neural network and the output that we get from every neuron in the neural network is considered embedding vector for unique_value_1.

Please correct me if I’m wrong.
Thank you!