From a7776510dd41f5939cca57e9e0a1a95b8bc1d36c Mon Sep 17 00:00:00 2001 From: zhaojiaying01 Date: Fri, 18 Jan 2019 15:22:44 +0800 Subject: [PATCH] fix gru_unit op --- src/operators/gru_unit_op.cpp | 2 +- src/operators/gru_unit_op.h | 2 +- src/operators/kernel/central-arm-func/gru_unit_arm_func.h | 4 ++-- src/operators/kernel/gru_unit_kernel.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/operators/gru_unit_op.cpp b/src/operators/gru_unit_op.cpp index 056026c5b9..38ddd21794 100644 --- a/src/operators/gru_unit_op.cpp +++ b/src/operators/gru_unit_op.cpp @@ -67,4 +67,4 @@ REGISTER_OPERATOR_CPU(gru_unit, ops::GruUnitOp); #ifdef PADDLE_MOBILE_CL #endif -#endif \ No newline at end of file +#endif diff --git a/src/operators/gru_unit_op.h b/src/operators/gru_unit_op.h index c9be667906..4188662d05 100644 --- a/src/operators/gru_unit_op.h +++ b/src/operators/gru_unit_op.h @@ -40,4 +40,4 @@ class GruUnitOp : public framework::OperatorWithKernel< } // namespace operators } // namespace paddle_mobile -#endif \ No newline at end of file +#endif diff --git a/src/operators/kernel/central-arm-func/gru_unit_arm_func.h b/src/operators/kernel/central-arm-func/gru_unit_arm_func.h index 599b9b46ce..af97ef7507 100644 --- a/src/operators/kernel/central-arm-func/gru_unit_arm_func.h +++ b/src/operators/kernel/central-arm-func/gru_unit_arm_func.h @@ -47,7 +47,7 @@ void GruUnitCompute(const GruUnitParam& param) { gru_value.state_weight = const_cast(weight_data + 2 * frame_size * frame_size); gru_value.output_value = hidden->data

(); - gru_value.prev_out_value = gru_value.output_value; + gru_value.prev_out_value = hidden_prev->data

(); gru_value.gate_value = gate->data

(); gru_value.reset_output_value = reset_hidden_prev->data

(); auto active_node = math::GetActivationType(param.Activation()); @@ -59,4 +59,4 @@ void GruUnitCompute(const GruUnitParam& param) { } // namespace operators } // namespace paddle_mobile -#endif \ No newline at end of file +#endif diff --git a/src/operators/kernel/gru_unit_kernel.h b/src/operators/kernel/gru_unit_kernel.h index 53dfa234a7..bda17cd205 100644 --- a/src/operators/kernel/gru_unit_kernel.h +++ b/src/operators/kernel/gru_unit_kernel.h @@ -32,4 +32,4 @@ class GruUnitKernel } // namespace operators } // namespace paddle_mobile -#endif \ No newline at end of file +#endif -- GitLab