Train nn.embedding

Double post from here.
Let’s continue the discussion in the other thread, please.