sxjscience removed a comment on issue #14476: Change RNN OP to stateful URL: https://github.com/apache/incubator-mxnet/pull/14476#issuecomment-480657961 I see. I misinterpreted kStateCell as kState. My mistake. Get Outlook for iOS<https://aka.ms/o0ukef> ________________________________ From: Hao Li <[email protected]> Sent: Monday, April 8, 2019 9:55 AM To: apache/incubator-mxnet Cc: Xingjian SHI; Review requested Subject: Re: [apache/incubator-mxnet] Change RNN OP to stateful (#14476) @lihaofd commented on this pull request. ________________________________ In src/operator/rnn-inl.h<https://github.com/apache/incubator-mxnet/pull/14476#discussion_r272866427>: > if (param_.mode == rnn_enum::kLstm) { CHECK_NE(req[rnn_enum::kStateCell], kAddTo) << "AddTo is not supported for state cell"; - cx_ptr = in_data[rnn_enum::kStateCell].dptr<DType>(); - dcx_ptr = in_grad[rnn_enum::kStateCell].dptr<DType>(); - if (param_.state_outputs) { - dcy_ptr = out_grad[rnn_enum::kStateCellOut].dptr<DType>(); - } + cx_ptr = (in_data[rnn_enum::kStateCell].get<xpu, 3, DType>(s)).dptr_; + dcx_ptr = (in_grad[rnn_enum::kStateCell].get<xpu, 3, DType>(s)).dptr_; No, cx_ptr is different from hx.dptr_. dcx_ptr is different from dhx.dptr_ too. cx_ptr and dcx_ptr are only for lstm — You are receiving this because your review was requested. Reply to this email directly, view it on GitHub<https://github.com/apache/incubator-mxnet/pull/14476#discussion_r272866427>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AE8D7h9t1MLcb6BS1GZ6aQOCatTrqfD8ks5veqGQgaJpZM4b-BkR>.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
