Fix CTC loss for zero-length targets on GPU (#23298)
Summary:
Fixes: https://github.com/pytorch/pytorch/issues/18215 at last!
Also sprinkle tests...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23298
Differential Revision: D16582145
Pulled By: soumith
fbshipit-source-id: bc8b1a629de0c2606e70a2218ccd135f4a9cdc5d