Enable testing on Loss modules (#14778)
authorDavid Riazati <davidriazati@fb.com>
Wed, 5 Dec 2018 02:32:05 +0000 (18:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 5 Dec 2018 02:35:10 +0000 (18:35 -0800)
commita66669a110a6eeeef8e08293174138ca87dc1a66
treed18da3270e3f6db4f77a0563f05ef22b700c4839
parentd872af92826a71034da9125165b9e0433ffba0d8
Enable testing on Loss modules (#14778)

Summary:
This PR adds `None` buffers as parameters (similarly to #14715). It also cleans up a bunch of the `test_jit.py` tests that should be covered by `common_nn.py` and brings in `criterion_tests` to test loss functions.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14778

Differential Revision: D13330849

Pulled By: driazati

fbshipit-source-id: 924cc4cf94e0dcd11e811a55222fd2ebc42a9e76
test/common_nn.py
test/test_jit.py
torch/jit/__init__.py
torch/nn/functional.py
torch/nn/modules/loss.py