TaoLv commented on a change in pull request #13699: add mkldnn softmax_output
URL: https://github.com/apache/incubator-mxnet/pull/13699#discussion_r246755554
##########
File path: src/operator/softmax_output.cc
##########
@@ -21,30 +21,141 @@
* Copyright (c) 2015 by Contributors
* \file softmax_output.cc
* \brief
- * \author Bing Xu
+ * \author Bing Xu, Zhang Rong A
*/
#include "./softmax_output-inl.h"
-
+#if MXNET_USE_MKLDNN == 1
+#include "./nn/mkldnn/mkldnn_ops-inl.h"
+#endif
namespace mxnet {
namespace op {
-template<>
-Operator *CreateOp<cpu>(SoftmaxOutputParam param, int dtype) {
- Operator *op = nullptr;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
- op = new SoftmaxOutputOp<cpu, DType>(param);
- })
- return op;
+
+DMLC_REGISTER_PARAMETER(SoftmaxOutputParam);
+struct SoftmaxOutputGrad {
Review comment:
@eric-haibin-lin Please help to review this. Do we have any existing
gradient structure to do this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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