This repository was archived by the owner on Jul 1, 2023. It is now read-only.
Correcting calculation of Glorot uniform for Tensors #576
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.
During the refactoring of random initializers in PR #335, the limits on the Glorot uniform were missing a sqrt() around their values. This led to an incorrect distribution being calculated. This was missed in the tests introduced in that PR due to a too-large absolute value for the threshold.
This has been fixed, and the threshold is now able to be set per-test, so it is set to a tight enough value to catch a regression. Additionally, the previous values of the RNN and LSTM layer tests were correct, and are reverted here to what they were before they were changed in the above PR. The Sequential test values have been changed to match the results given by this new distribution, but I can't independently verify those.
I believe this fixes TF-1029.