enhance random range parameters #1635
Merged
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.
Allow min and max for random range-based parameters (e.g., amount of rotation in
RandRotate)From the new documentation:
If element
iis iterable, thenuniform[-rotate_range[i][0], rotate_range[i][1])will be used to generate the rotation parameter for the ith dimension. If not,uniform[-rotate_range[i], rotate_range[i])will be used. This can be altered on a per-dimension basis. E.g.,((0,3), 1, ...): for dim0, rotation will be in range[0, 3], and for dim1[-1, 1]will be used. Setting a single value will use[-x, x]for dim0 and nothing for the remaining dimensions.Backwards compatibility is ensured because the old behaviour used to do
uniform[-rotate_range[i], rotate_range[i]), and this PR just adds the possibility to douniform[-rotate_range[i][0], rotate_range[i][1]).