未验证 提交 8f32b92a 编写于 作者: H Houjiang Chen 提交者: GitHub

Merge pull request #1399 from smilejames/develop

fix compilation problems
...@@ -27,7 +27,7 @@ bool GruUnitKernel<CPU, float>::Init(GruUnitParam<CPU> *param) { ...@@ -27,7 +27,7 @@ bool GruUnitKernel<CPU, float>::Init(GruUnitParam<CPU> *param) {
template <> template <>
void GruUnitKernel<CPU, float>::Compute(const GruUnitParam<CPU> &param) { void GruUnitKernel<CPU, float>::Compute(const GruUnitParam<CPU> &param) {
GruUnitCompute(param); GruUnitCompute<float>(param);
} }
template class GruUnitKernel<CPU, float>; template class GruUnitKernel<CPU, float>;
......
...@@ -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 = hidden_prev->data<P>(); gru_value.prev_out_value = const_cast<P*>(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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册