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 check fail in crop_and_resize_op #65726

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

SuryanarayanaY
Copy link
Collaborator

@SuryanarayanaY SuryanarayanaY commented Apr 15, 2024

The Op CropAndResize checkfails with an input where boxes and box_ind both are 1D and empty tensors. This is due to missing validation for this particular case which skips the check of boxes for Rank-2.

The check skips from this line which checks for empty tensors but skips rank checking.

if (boxes.NumElements() == 0 && box_index.NumElements() == 0) {
*num_boxes = 0;
return absl::OkStatus();

May Fix #65629

The Op CropAndResize checkfails with an input where boxes and box_ind both are 1D and empty tensors. This is due to missing validation for this particular case which skips the check of boxes for Rank-2.
@google-ml-butler google-ml-butler bot added the size:XS CL Change Size: Extra Small label Apr 15, 2024
@gbaned gbaned added prtype:bugfix PR to fix a bug comp:core issues related to core part of tensorflow labels Apr 16, 2024
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Apr 16, 2024
@gbaned gbaned requested a review from sagunb April 16, 2024 02:51
@google-ml-butler google-ml-butler bot added the awaiting review Pull request awaiting review label Apr 16, 2024
Copy link
Member

@sagunb sagunb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes!

PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Apr 16, 2024
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Apr 16, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 16, 2024
@copybara-service copybara-service bot merged commit 378180e into master Apr 18, 2024
13 of 14 checks passed
PR Queue automation moved this from Approved by Reviewer to Merged Apr 18, 2024
@copybara-service copybara-service bot deleted the Surya_CropAndResize_checkfail branch April 18, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review Pull request awaiting review comp:core issues related to core part of tensorflow prtype:bugfix PR to fix a bug ready to pull PR ready for merge process size:XS CL Change Size: Extra Small
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

Check failed in tf.raw_ops.CropAndResize when boxes and box_ind are empty.
4 participants