提交 28c21fe6 编写于 作者: D dangqingqing

Fix compile error in prelu_op.

上级 f86c1ccd
...@@ -54,8 +54,8 @@ class PReluKernel : public framework::OpKernel { ...@@ -54,8 +54,8 @@ class PReluKernel : public framework::OpKernel {
int numel = x->numel(); int numel = x->numel();
auto place = context.GetPlace(); Transform(context.device_context(), x_ptr, x_ptr + numel, o_ptr,
Transform(place, x_ptr, x_ptr + numel, o_ptr, PReluFunctor<T>(alpha_ptr)); PReluFunctor<T>(alpha_ptr));
} }
}; };
...@@ -91,9 +91,8 @@ class PReluGradKernel : public framework::OpKernel { ...@@ -91,9 +91,8 @@ class PReluGradKernel : public framework::OpKernel {
const T* out_ptr = out->data<T>(); const T* out_ptr = out->data<T>();
int numel = dx->numel(); int numel = dx->numel();
auto place = context.GetPlace(); Transform(context.device_context(), out_ptr, out_ptr + numel, dout_ptr,
Transform(place, out_ptr, out_ptr + numel, dout_ptr, dx_ptr, dx_ptr, PReluGradFunctor<T>(alpha_ptr));
PReluGradFunctor<T>(alpha_ptr));
// TODO (Zhuoyuan): add dalpha upgrade when GPU kernels ready // TODO (Zhuoyuan): add dalpha upgrade when GPU kernels ready
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册