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.
See google-research/big_vision#109, fix suggested by @yeqingli in tensorflow/models#11219 (review).
In short, the original implementation of the contrast() transform which is copied 4-5+ times is broken:
What is meant to be the mean RGB value ends up being (h*w) / 256, which is always 196 for 224x224 crop.
This bug is often left unfixed, but here we are comparing the JAX vs. PyTorch implementations and the latter has the correct contrast transform:
algorithmic-efficiency/algorithmic_efficiency/workloads/imagenet_resnet/imagenet_pytorch/randaugment.py
Lines 107 to 108 in 86d2a0d
So the JAX counterpart should be correct as well.