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

Commit

Permalink
percentile
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiyan66 committed Feb 17, 2020
1 parent afcf4f7 commit 0b6a974
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/operator/numpy/np_percentile_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ NNVM_REGISTER_OP(_npi_percentile)
.set_attr<nnvm::FInferType>("FInferType", NumpyPercentileType)
.set_attr<nnvm::FListInputNames>("FListInputNames",
[](const NodeAttrs& attrs) {
return std::vector<std::string>{"a", "q"};
const NumpyPercentileParam& param =
nnvm::get<NumpyPercentileParam>(attrs.parsed);
return param.q_scalar.has_value() ?
std::vector<std::string>{"a"} :
std::vector<std::string>{"a", "q"};
})
.set_attr<FCompute>("FCompute<cpu>", NumpyPercentileForward<cpu>)
.set_attr<FResourceRequest>("FResourceRequest",
Expand Down

0 comments on commit 0b6a974

Please sign in to comment.