From 760d20de92dfb45e95aa2c3d8d86cb69b1ab5c56 Mon Sep 17 00:00:00 2001 From: yangyaming Date: Tue, 19 Dec 2017 15:19:26 +0800 Subject: [PATCH] Add test for sequence_softmax. --- python/paddle/v2/fluid/tests/test_layers.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/paddle/v2/fluid/tests/test_layers.py b/python/paddle/v2/fluid/tests/test_layers.py index d4a95bf6f..9d2dcca56 100644 --- a/python/paddle/v2/fluid/tests/test_layers.py +++ b/python/paddle/v2/fluid/tests/test_layers.py @@ -187,6 +187,15 @@ class TestBook(unittest.TestCase): x_t=x_t, hidden_t_prev=prev_hidden, cell_t_prev=prev_cell)) print(str(program)) + def test_sequence_softmax(self): + program = Program() + with program_guard(program): + seq_data = layers.data( + name='seq_data', shape=[10, 10], dtype='float32', lod_level=1) + seq = layers.fc(input=seq_data, size=20) + self.assertIsNotNone(layers.sequence_softmax(x=seq)) + print(str(program)) + if __name__ == '__main__': unittest.main() -- GitLab