提交 1eeb11ef 编写于 作者: S sneaxiy

refine ZeroGradFunctor in activation_op.h

上级 19fd0717
......@@ -353,7 +353,7 @@ struct ZeroGradFunctor : public BaseActivationFunctor<T> {
template <typename Device, typename X, typename Out, typename dOut,
typename dX>
void operator()(Device d, X x, Out out, dOut dout, dX dx) const {
dx.device(d) = static_cast<T>(0) / out;
dx.device(d) = out.constant(static_cast<T>(0));
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册