From 889fc6e1bce9a0da7317e5fbe19bd4e215d450a4 Mon Sep 17 00:00:00 2001 From: Wang Jiajun Date: Thu, 16 May 2019 13:51:18 +0800 Subject: [PATCH] change transfer gradient --- src/operator/tensor/la_op-inl.h | 1 - src/operator/tensor/la_op.cc | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/operator/tensor/la_op-inl.h b/src/operator/tensor/la_op-inl.h index 2f457abf7d7c..4dead87b3dce 100644 --- a/src/operator/tensor/la_op-inl.h +++ b/src/operator/tensor/la_op-inl.h @@ -813,7 +813,6 @@ struct syevd_backward { struct inverse_backward { template static void op(const Tensor& dA, - const Tensor& B, const Tensor& A, const Tensor& dB, const OpContext& ctx, const nnvm::NodeAttrs& attrs) { diff --git a/src/operator/tensor/la_op.cc b/src/operator/tensor/la_op.cc index 3d4e4f57d5a5..2fa1fd3a1cb2 100644 --- a/src/operator/tensor/la_op.cc +++ b/src/operator/tensor/la_op.cc @@ -926,18 +926,18 @@ Examples:: .set_attr("FResourceRequest", [](const NodeAttrs& attrs) { return std::vector{ResourceRequest::kTempSpace}; }) .set_attr("FCompute", LaOpForward) -.set_attr("FGradient", ElemwiseGradUseInOut{"_backward_linalg_inverse"}) +.set_attr("FGradient", ElemwiseGradUseOut{"_backward_linalg_inverse"}) .add_argument("A", "NDArray-or-Symbol", "Tensor of square matrix"); NNVM_REGISTER_OP(_backward_linalg_inverse) -.set_num_inputs(3) +.set_num_inputs(2) .set_num_outputs(1) .set_attr("FInplaceOption", [](const NodeAttrs& attrs) { return std::vector >{{0, 0}}; }) .set_attr("FResourceRequest", [](const NodeAttrs& attrs) { return std::vector{ResourceRequest::kTempSpace}; }) .set_attr("TIsBackward", true) -.set_attr("FCompute", LaOpBackward); +.set_attr("FCompute", LaOpBackward); } // namespace op } // namespace mxnet