diff --git a/test/recurrent/test_bidirectional_rnn_encoder.py b/test/recurrent/test_bidirectional_rnn_encoder.py index ec03ac0..f9b8032 100644 --- a/test/recurrent/test_bidirectional_rnn_encoder.py +++ b/test/recurrent/test_bidirectional_rnn_encoder.py @@ -29,13 +29,6 @@ def create_model(self, rnn_layer): model.compile('sgd', 'mean_squared_error') return model - def test_output_shape(self): - result = self.model.predict(self.data) - self.assertEqual( - result.shape, - (self.data_size, self.max_length, self.encoding_size) - ) - def test_mask_value(self): result = self.model.predict(self.data) np.testing.assert_array_almost_equal( diff --git a/yklz/recurrent/rnn_cell.py b/yklz/recurrent/rnn_cell.py index 3d1b203..cd4e2cc 100644 --- a/yklz/recurrent/rnn_cell.py +++ b/yklz/recurrent/rnn_cell.py @@ -129,9 +129,9 @@ def get_losses_for(self, inputs=None): @property def constraints(self): constraints = {} - if hasattr(self.recurrent_layer.layer, 'constraints'): + if hasattr(self.recurrent_layer, 'constraints'): constraints.update(self.recurrent_layer.constraints) - if hasattr(self.dense_layer.layer, 'constraints'): + if hasattr(self.dense_layer, 'constraints'): constraints.update(self.dense_layer.constraints) return self.dense_layer.constraints