Fix nll_loss crash on cpu where ignore_index is out of bounds (#17328)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/15508
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17328
Differential Revision: D14322629
Pulled By: soumith
fbshipit-source-id: 7d02f372be78794782c18affcfc109ce30b1e91c