diff --git a/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc b/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc index 050ab2c9418f69727024aa72a070df54e3e88459..8a3bb5318cb3bb40242a676896c4144752dbd109 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc @@ -180,7 +180,10 @@ REGISTER_OPERATOR(sequence_pool_grad, ops::SequencePoolGradOp, ops::SequencePoolGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_pool, - ops::SequencePoolKernel); + ops::SequencePoolKernel, + ops::SequencePoolKernel); + REGISTER_OP_CPU_KERNEL( sequence_pool_grad, - ops::SequencePoolGradKernel); + ops::SequencePoolGradKernel, + ops::SequencePoolGradKernel); diff --git a/python/paddle/fluid/layers/sequence_lod.py b/python/paddle/fluid/layers/sequence_lod.py index 969e85a74251934d5ea7bea5354e8899781dc2c6..2d9ece63d0c1a68de2437f4d6da11f4917e439e9 100644 --- a/python/paddle/fluid/layers/sequence_lod.py +++ b/python/paddle/fluid/layers/sequence_lod.py @@ -346,7 +346,8 @@ def sequence_pool(input, pool_type, is_test=False, pad_value=0.0): """ assert not in_dygraph_mode(), ( "sequence layer is not supported in dygraph mode yet.") - check_variable_and_dtype(input, 'input', ['float32'], 'sequence_pool') + check_variable_and_dtype(input, 'input', ['float32', 'float64'], + 'sequence_pool') helper = LayerHelper('sequence_pool', **locals()) dtype = helper.input_dtype() pool_out = helper.create_variable_for_type_inference(dtype)