Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Correcting calculation of Glorot uniform for Tensors #576

Merged
merged 2 commits into from
Dec 7, 2019
Merged

Correcting calculation of Glorot uniform for Tensors #576

merged 2 commits into from
Dec 7, 2019

Conversation

BradLarson
Copy link
Contributor

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.

@brettkoonce
Copy link
Contributor

@BradLarson testing, thanks again for looking into this!

@brettkoonce
Copy link
Contributor

@BradLarson tested locally, works for me! 👍

@BradLarson BradLarson merged commit 47de233 into tensorflow:master Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants