This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Docs: fix inconsistent description for scale_limit in RandomScale and ShiftScaleRotate. #1105
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.
Although the RandomScale and ShiftScaleRotate use the same sampling strategy, it is explained differently.
See:
RandomScale
"If scale_limit is a single float value, the range will be (1 - scale_limit, 1 + scale_limit). Default: (0.9, 1.1)"
ShiftScaleRotate
"If scale_limit is a single float value, the range will be (-scale_limit, scale_limit). Default: (-0.1, 0.1)."
I think the ShiftScaleRotate's doc is better because saying that default is (0.9, 1.1) is misleading.
And to mitigate confusion about RandomScale (#910 #568 #548 #737), I add the following sentences.
"Note that the scale_limit will be biased by 1. When the scale_limit is a tuple, like (low, high), sampling will be done from the range (1 + low, 1 + high)."
I appreciate it if you review this.