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 mismatch of shape restriction in DrawBoundingBoxes #19635

Merged
merged 1 commit into from
Jun 4, 2018
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
4 changes: 3 additions & 1 deletion tensorflow/core/ops/image_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,9 @@ REGISTER_OP("DrawBoundingBoxes")
DimensionHandle unused;
TF_RETURN_IF_ERROR(c->WithValue(c->Dim(boxes, 2), 4, &unused));

return shape_inference::UnchangedShapeWithRankAtLeast(c, 3);
// The rank of the input image (rank = 4) has already been restricted
// above, and the output is of the same shape as the input.
return shape_inference::UnchangedShape(c);
});

// --------------------------------------------------------------------------
Expand Down