Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix tf.raw_ops.RaggedTensorToTensor failing CHECK in tensor.cc.
PiperOrigin-RevId: 368300502
Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64
  • Loading branch information
Amit Patankar authored and tensorflower-gardener committed Apr 13, 2021
1 parent b055b9c commit f94ef35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc
Expand Up @@ -345,6 +345,11 @@ class RaggedTensorToTensorBaseOp : public OpKernel {

void Compute(OpKernelContext* context) override {
INDEX_TYPE first_dimension;
const Tensor first_partition_tensor =
context->input(kFirstPartitionInputIndex);
OP_REQUIRES(context, first_partition_tensor.NumElements() > 0,
errors::InvalidArgument("Invalid first partition input. Tensor "
"requires at least one element."));
OP_REQUIRES_OK(context, GetFirstDimensionSize(context, &first_dimension));
vector<INDEX_TYPE> output_size;
OP_REQUIRES_OK(context,
Expand Down

0 comments on commit f94ef35

Please sign in to comment.