提交 155f64a2 编写于 作者: Z zhaojiaying01

fix gru_unit op

上级 3215378f
...@@ -67,4 +67,4 @@ REGISTER_OPERATOR_CPU(gru_unit, ops::GruUnitOp); ...@@ -67,4 +67,4 @@ REGISTER_OPERATOR_CPU(gru_unit, ops::GruUnitOp);
#ifdef PADDLE_MOBILE_CL #ifdef PADDLE_MOBILE_CL
#endif #endif
#endif #endif
\ No newline at end of file
...@@ -40,4 +40,4 @@ class GruUnitOp : public framework::OperatorWithKernel< ...@@ -40,4 +40,4 @@ class GruUnitOp : public framework::OperatorWithKernel<
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
#endif #endif
\ No newline at end of file
...@@ -47,7 +47,7 @@ void GruUnitCompute(const GruUnitParam<CPU>& param) { ...@@ -47,7 +47,7 @@ void GruUnitCompute(const GruUnitParam<CPU>& param) {
gru_value.state_weight = gru_value.state_weight =
const_cast<P*>(weight_data + 2 * frame_size * frame_size); const_cast<P*>(weight_data + 2 * frame_size * frame_size);
gru_value.output_value = hidden->data<P>(); gru_value.output_value = hidden->data<P>();
gru_value.prev_out_value = gru_value.output_value; gru_value.prev_out_value = hidden_prev->data<P>();
gru_value.gate_value = gate->data<P>(); gru_value.gate_value = gate->data<P>();
gru_value.reset_output_value = reset_hidden_prev->data<P>(); gru_value.reset_output_value = reset_hidden_prev->data<P>();
auto active_node = math::GetActivationType(param.Activation()); auto active_node = math::GetActivationType(param.Activation());
...@@ -59,4 +59,4 @@ void GruUnitCompute(const GruUnitParam<CPU>& param) { ...@@ -59,4 +59,4 @@ void GruUnitCompute(const GruUnitParam<CPU>& param) {
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
#endif #endif
\ No newline at end of file
...@@ -32,4 +32,4 @@ class GruUnitKernel ...@@ -32,4 +32,4 @@ class GruUnitKernel
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
#endif #endif
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册