Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tf.raw_ops.RaggedTensorToTensor failing CHECK in tensor.cc. #49342

Merged
merged 1 commit into from
May 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc
Original file line number Diff line number Diff line change
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