diff options
Diffstat (limited to 'tensorflow/python/keras/layers/gru_test.py')
-rw-r--r-- | tensorflow/python/keras/layers/gru_test.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/python/keras/layers/gru_test.py b/tensorflow/python/keras/layers/gru_test.py index afef997b00..9988c9fae5 100644 --- a/tensorflow/python/keras/layers/gru_test.py +++ b/tensorflow/python/keras/layers/gru_test.py @@ -87,7 +87,7 @@ class GRULayerTest(test.TestCase): embedding_dim = 4 units = 2 layer_class = keras.layers.GRU - with self.test_session(): + with self.cached_session(): model = keras.models.Sequential() model.add( keras.layers.Embedding( @@ -146,7 +146,7 @@ class GRULayerTest(test.TestCase): def test_regularizers_GRU(self): embedding_dim = 4 layer_class = keras.layers.GRU - with self.test_session(): + with self.cached_session(): layer = layer_class( 5, return_sequences=False, @@ -166,7 +166,7 @@ class GRULayerTest(test.TestCase): def test_constraints_GRU(self): embedding_dim = 4 layer_class = keras.layers.GRU - with self.test_session(): + with self.cached_session(): k_constraint = keras.constraints.max_norm(0.01) r_constraint = keras.constraints.max_norm(0.01) b_constraint = keras.constraints.max_norm(0.01) @@ -186,7 +186,7 @@ class GRULayerTest(test.TestCase): @tf_test_util.run_in_graph_and_eager_modes def test_with_masking_layer_GRU(self): layer_class = keras.layers.GRU - with self.test_session(): + with self.cached_session(): inputs = np.random.random((2, 3, 4)) targets = np.abs(np.random.random((2, 3, 5))) targets /= targets.sum(axis=-1, keepdims=True) |