Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix tf.raw_ops.CTCGreedyDecoder CHECK failure.
PiperOrigin-RevId: 369960465
Change-Id: If0b8b3264d5a47a24ac0970ed7b81ce6b4921fae
  • Loading branch information
Amit Patankar authored and tensorflower-gardener committed Apr 22, 2021
1 parent 1615440 commit ea3b43e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tensorflow/core/kernels/ctc_decoder_ops.cc
Expand Up @@ -232,6 +232,8 @@ class CTCGreedyDecoderOp : public OpKernel {
int prev_indices = -1;
for (int t = 0; t < seq_len_t(b); ++t) {
int max_class_indices;
OP_REQUIRES(ctx, input_list_t[t].dimension(1) > 0,
errors::InvalidArgument("Invalid input dimensions."));
log_prob_t(b, 0) +=
-RowMax<T>(input_list_t[t], b, &max_class_indices);
if (max_class_indices != blank_index &&
Expand Down

0 comments on commit ea3b43e

Please sign in to comment.