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