Fix reduction='none' in poisson_nll_loss (#17358)
authorvishwakftw <cs15btech11043@iith.ac.in>
Mon, 25 Feb 2019 18:32:48 +0000 (10:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 25 Feb 2019 18:35:33 +0000 (10:35 -0800)
commit724c7e76c69ac26140ceb61576de8b96bb8417e8
treea1b95a7d2bdf1f94356f0f09f6c3b4eef64ded90
parentf9ba3831ef3ae8501612d51353907717231871f2
Fix reduction='none' in poisson_nll_loss (#17358)

Summary:
Changelog:
- Modify `if` to `elif` in reduction mode comparison
- Add error checking for reduction mode
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17358

Differential Revision: D14190523

Pulled By: zou3519

fbshipit-source-id: 2b734d284dc4c40679923606a1aa148e6a0abeb8
test/test_nn.py
torch/nn/functional.py