Grid and cutout dropout - Resolved copilot review comments#566
Merged
r-abishek merged 1 commit intor-abishek:ar/dropout_grid_cutoutfrom Feb 25, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request addresses previous Copilot review comments for the grid and cutout dropout functionality. The changes primarily fix boundary calculation issues, prevent zero-value dimensions, correct buffer allocations, and add documentation images for the dropout augmentations.
Changes:
- Fixed bounding box calculations to use inclusive right-bottom coordinates (subtract 1.0f) and changed minimum x_start/y_start from 1.0f to 0.0f
- Added protection against zero-value dimensions in grid dropout by using std::max(1u, ...) for cell and hole dimensions
- Corrected colorBuffer allocation to account for all color channels (multiplied by srcDescPtr->c)
- Replaced implicit totalBoxes variable with explicit calculation (srcDescPtr->n * boxesInEachImage) for clarity
- Improved API documentation for cutout_dropout parameter descriptions
- Added sample output images for grid_dropout, cutout_dropout, and channel_dropout augmentations
Reviewed changes
Copilot reviewed 4 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utilities/test_suite/rpp_test_suite_image.h | Fixed bounding box calculations in init_dropout_erase (0.0f min, -1.0f for inclusive bounds) and added std::max(1u, ...) protections in init_grid_dropout |
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Corrected colorBuffer allocation to multiply by srcDescPtr->c for per-channel color values |
| src/modules/tensor/hip/kernel/grid_dropout.cpp | Replaced implicit totalBoxes with explicit srcDescPtr->n * boxesInEachImage for clarity |
| api/rppt_tensor_effects_augmentations.h | Enhanced documentation clarity for anchorBoxInfoTensor, colorsTensor, and numBoxesTensor parameters |
| docs/data/doxygenOutputs/effects_augmentations_gird_dropout_img150x150.png | Added sample output image (contains filename spelling error: "gird" should be "grid") |
| docs/data/doxygenOutputs/effects_augmentations_cutout_dropout_img150x150.png | Added sample output image for cutout_dropout |
| docs/data/doxygenOutputs/effects_augmentations_channel_dropout_img150x150.png | Added sample output image for channel_dropout |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
r-abishek
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.