Solved by vdw in post #3 
              
              
                An Embedding layer is essentially just a Linear layer. So you could define a your layer as nn.Linear(1000, 30), and represent each word as a one-hot vector, e.g., [0,0,1,0,...,0] (the length of the vector is 1,000). 
As you can see, any word is a unique vector of size 1,000 with a 1 in a unique posi…