Skip to content

Commit f529d46

Browse files
committed
Fix Python API.
1 parent 483947c commit f529d46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/paddle/v2/framework/layers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,13 @@ def sequence_pool(input, pool_type, **kwargs):
372372
helper = LayerHelper('sequence_pool', input=input, **kwargs)
373373
dtype = helper.input_dtype()
374374
pool_out = helper.create_tmp_variable(dtype)
375+
max_index = helper.create_tmp_variable(dtype)
375376

376377
helper.append_op(
377378
type="sequence_pool",
378-
inputs={"X": [input]},
379-
outputs={"Out": [pool_out]},
379+
inputs={"X": input},
380+
outputs={"Out": pool_out,
381+
"MaxIndex": max_index},
380382
attrs={"pooltype": pool_type.upper()})
381383

382384
return pool_out

0 commit comments

Comments
 (0)