Simplify target handling in nn gradcheck. (#44507)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/44507
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D23635799
Pulled By: gchanan
fbshipit-source-id: 75090d6a48771e5c92e737a0829fbfa949f7c8a7