diff options
author | 2017-01-09 18:21:43 -0800 | |
---|---|---|
committer | 2017-01-09 18:43:31 -0800 | |
commit | 51c0dad09e9bcf3a8f52cd2e034538816bfe13e8 (patch) | |
tree | 81d3e3836beb3fab9b6d4232369ea42eb397d7b5 /tensorflow/contrib/legacy_seq2seq | |
parent | 1b2655b3182d67165fd2fa033caa8f284af1e20f (diff) |
Change default initializer to glorot_uniform.
It is the same as uniform_unit_scaling for most inputs, inlcuding 2D ones,
but has a slight difference in larger-dimensional cases. This makes
default initialization the same as in Keras and some other frameworks.
Also correct edge cases in the initializer and the few smoke tests that rely on it.
Change: 144033334
Diffstat (limited to 'tensorflow/contrib/legacy_seq2seq')
-rw-r--r-- | tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py b/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py index d8340c24e4..993ce87211 100644 --- a/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py +++ b/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py @@ -886,7 +886,8 @@ class Seq2SeqTest(test.TestCase): perplexities[bucket].append(math.exp(float(res[1]))) for bucket in range(len(buckets)): if len(perplexities[bucket]) > 1: # Assert that perplexity went down. - self.assertLess(perplexities[bucket][-1], perplexities[bucket][0]) + self.assertLess(perplexities[bucket][-1], # 10% margin of error. + 1.1 * perplexities[bucket][0]) def testModelWithBooleanFeedPrevious(self): """Test the model behavior when feed_previous is True. |