From 9f27699ad3492d513388e56093a33af4c5bd47cf Mon Sep 17 00:00:00 2001 From: Hao Jin Date: Fri, 28 Sep 2018 22:18:48 +0000 Subject: [PATCH] add FListInputNames attribute to softmax_cross_entropy --- src/operator/loss_binary_op.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/operator/loss_binary_op.cc b/src/operator/loss_binary_op.cc index c1fedb3de61c..df8576cfbb83 100644 --- a/src/operator/loss_binary_op.cc +++ b/src/operator/loss_binary_op.cc @@ -67,6 +67,10 @@ Example:: }) .set_attr("FCompute", SoftmaxCrossEntropyForward) .set_attr("FGradient", ElemwiseGradUseIn{"_backward_softmax_cross_entropy"}) +.set_attr("FListInputNames", + [](const NodeAttrs& attrs) { + return std::vector{"data", "label"}; +}) .add_argument("data", "NDArray-or-Symbol", "Input data") .add_argument("label", "NDArray-or-Symbol", "Input label");