Better bounds checks in ctcloss (#16269)
authorAsher Mancinelli <asher.mancinelli@pnnl.gov>
Fri, 1 Feb 2019 15:59:56 +0000 (07:59 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 1 Feb 2019 16:02:54 +0000 (08:02 -0800)
commit7078b2baf57bb6664309c680d4cc35bae23d6c9d
tree9d289f3d7f524dcdf87eab983129e0297342f665
parent87ae1558a6c8c7c0693bfa995458d16239c484d7
Better bounds checks in ctcloss (#16269)

Summary:
Adds better bounds checks for target lengths in CTC loss, checks for integral types for target and prediction lengths, and adds tests for each, according to #15946
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16269

Differential Revision: D13847567

Pulled By: ezyang

fbshipit-source-id: 5d7a975565e02baf78fe388813a1d1ef56dfb212
aten/src/ATen/native/LossCTC.cpp
aten/src/ATen/native/cuda/LossCTC.cu
test/test_nn.py