Skip to content

Conversation

@pantment
Copy link

This PR fixes a bug in RandomExpand.call where the probability check was inverted.
According to the docstring, prob is the probability to expand, but the previous implementation expanded with probability 1 - prob.
The condition has been corrected so that expansion now happens with the intended probability.

@CLAassistant
Copy link

CLAassistant commented Nov 29, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in the RandomExpand transform where the probability check was inverted, causing the transform to expand images with probability 1 - prob instead of the intended prob as documented in the docstring.

Changes:

  • Corrected the probability condition in RandomExpand.__call__ from < self.prob to >= self.prob for the early return

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Borda Borda added the bug Something isn't working label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working has conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants