[fix] nn.Embedding.from_pretrained : honour `padding_idx` argument (#47184)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/46585 (first snippet)
Now the behaviour of `padding_idx` agrees with documentation.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47184
Reviewed By: mruberry
Differential Revision: D24682567
Pulled By: albanD
fbshipit-source-id: 864bd34eb9099d367a3fcbb8f4f4ba2e2b270724