From f529d4654000beaf7e23ccfb8b10fa0a240f8e4a Mon Sep 17 00:00:00 2001 From: dangqingqing Date: Mon, 6 Nov 2017 12:05:36 +0800 Subject: [PATCH] Fix Python API. --- python/paddle/v2/framework/layers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/framework/layers.py b/python/paddle/v2/framework/layers.py index 0739b2d2e29..b7e468fb51c 100644 --- a/python/paddle/v2/framework/layers.py +++ b/python/paddle/v2/framework/layers.py @@ -372,11 +372,13 @@ def sequence_pool(input, pool_type, **kwargs): helper = LayerHelper('sequence_pool', input=input, **kwargs) dtype = helper.input_dtype() pool_out = helper.create_tmp_variable(dtype) + max_index = helper.create_tmp_variable(dtype) helper.append_op( type="sequence_pool", - inputs={"X": [input]}, - outputs={"Out": [pool_out]}, + inputs={"X": input}, + outputs={"Out": pool_out, + "MaxIndex": max_index}, attrs={"pooltype": pool_type.upper()}) return pool_out -- GitLab