Skip to content

Commit

Permalink
Fix a compilation error in activation.
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-da committed Nov 30, 2017
1 parent 9e33bc0 commit d9e706a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operator/nn/activation-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ void ActivationForward(const OpContext &ctx, const TBlob &in_data,
using namespace mshadow;
using namespace mshadow::expr;
Stream<xpu> *s = ctx.get_stream<xpu>();
const size_t sz = input.shape_.Size();
const size_t sz = in_data.shape_.Size();
if (sz) {
MXNET_ASSIGN_REQ_SWITCH(req[activation::kOut], Req, {
MXNET_ASSIGN_REQ_SWITCH(req, Req, {
mxnet_op::Kernel<mxnet_op::op_with_req<ForwardOp, Req>, xpu>::Launch(
s, sz,
out_data.dptr<DType>(),
Expand All @@ -88,7 +88,7 @@ void ActivationBackward(const OpContext &ctx, const TBlob &out_grad,
Stream<xpu> *s = ctx.get_stream<xpu>();
const size_t sz = out_data.shape_.Size();
if (sz) {
MXNET_ASSIGN_REQ_SWITCH(req[activation::kData], Req, {
MXNET_ASSIGN_REQ_SWITCH(req, Req, {
mxnet_op::Kernel<mxnet_op::op_with_req<
mxnet::op::mxnet_op::backward_grad_tuned<BackwardOp>, Req>, xpu>::Launch(
s, sz,
Expand Down

0 comments on commit d9e706a

Please sign in to comment.