Add additional shape validation to `compute_accidental_hits`
authorYong Tang <yong.tang.github@outlook.com>
Sun, 13 May 2018 13:55:53 +0000 (13:55 +0000)
committerYong Tang <yong.tang.github@outlook.com>
Mon, 14 May 2018 00:32:50 +0000 (00:32 +0000)
commit356f360e8772a2697ec0d30036237342549803f5
treed541b9d084ee457a5a2a4035fd60bc94efb790ae
parentf27033fb1212d7031a359c913d0f59e976b14c14
Add additional shape validation to `compute_accidental_hits`

In `compute_accidental_hits`, the `sampled_candidates` must
be a vector, as is shown in the kernel implementation in
`tensorflow/core/kernels/candidate_sampler_ops.cc`.

This fix adds shape validation of `sampled_candidates`
in the shape function whenever possible.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
tensorflow/core/ops/candidate_sampling_ops.cc