Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
add FListInputNames attribute to softmax_cross_entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
haojin2 committed Sep 28, 2018
1 parent 9ce5792 commit 9f27699
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/operator/loss_binary_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Example::
})
.set_attr<FCompute>("FCompute<cpu>", SoftmaxCrossEntropyForward<cpu>)
.set_attr<nnvm::FGradient>("FGradient", ElemwiseGradUseIn{"_backward_softmax_cross_entropy"})
.set_attr<nnvm::FListInputNames>("FListInputNames",
[](const NodeAttrs& attrs) {
return std::vector<std::string>{"data", "label"};
})
.add_argument("data", "NDArray-or-Symbol", "Input data")
.add_argument("label", "NDArray-or-Symbol", "Input label");

Expand Down

0 comments on commit 9f27699

Please sign in to comment.