Skip to content

Commit

Permalink
Use all outputs if no filter is given
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccrmck committed Apr 15, 2019
1 parent 69024e4 commit 7554190
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions onnxruntime/hosting/executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ protobufutil::Status Executor::Predict(const std::string& model_name,
for (const auto& name : request.output_filter()) {
output_names.push_back(name);
}

// If output_filter is empty then use all outputs
if (request.output_filter().empty()) {
for (const auto& name : request.output_filter()) {
output_names.push_back(name);
}
}
std::vector<onnxruntime::MLValue> outputs(output_names.size());

// Run
Expand Down

0 comments on commit 7554190

Please sign in to comment.