@rajarsheem that’s not a very good idea if your vector dimensionality is large. You’ll end up storing a huge weight matrix in memory, and in your code emb.weight requires gradient and it might be subject to optimization if you don’t take care.
Additionaly, zero + scatter a few ones will be  much faster than copying whole rows, of which most values are 0 anyway.