add from_pretrained method to EmbeddingBag (#15273)
authorDavid Pollack <david@da3.net>
Wed, 26 Dec 2018 16:31:00 +0000 (08:31 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 26 Dec 2018 16:35:39 +0000 (08:35 -0800)
commitcdb8edce7572342cf6f5d98807678e9ed3a1a32e
tree468df49ba5ce28b12e6262d49b1d6bed0a6bf6a3
parent5ac95758e2d9362f21a33c6846da37804184e198
add from_pretrained method to EmbeddingBag (#15273)

Summary:
The `EmbeddingBag` module does not include a `from_pretrained` method like the `Embedding` module.  I added it for consistency between the two modules.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15273

Differential Revision: D13547842

Pulled By: soumith

fbshipit-source-id: 8ffde51ff0c1e8fc8310263b6f375da88089ff7d
test/test_nn.py
torch/nn/modules/sparse.py