Skip to content

Commit

Permalink
Not set output explicitly in dnn_retrieve_result
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 13, 2019
1 parent b0ff867 commit 39ebfea
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions binaries/dnn_retrieve_result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ int main(int argc, char **argv) {
return -1;
}
string daqName = argv[1];
string outputBlob = argv[2];
bool quant_input = std::atoi(argv[3]) != 0;
bool quant_output = std::atoi(argv[4]) != 0;
bool use_external_input = argc >= 6;
bool quant_input = std::atoi(argv[2]) != 0;
bool quant_output = std::atoi(argv[3]) != 0;
bool use_external_input = argc >= 5;

std::unique_ptr<Model> model;
ModelBuilder builder;
Expand All @@ -68,8 +67,7 @@ int main(int argc, char **argv) {
". It must end with .daq or .onnx (.onnx is only "
"supported when DNN_READ_ONNX is ON)");
}
model = builder.AddOutput(outputBlob)
.Compile(ANEURALNETWORKS_PREFER_SUSTAINED_SPEED);
model = builder.Compile(ANEURALNETWORKS_PREFER_SUSTAINED_SPEED);
DNN_ASSERT(model->GetOutputs().size() == 1, "the number of outputs can only be 1 here");
const auto outputLen = model->GetSize(model->GetOutputs()[0]);
std::vector<std::vector<float>> inputs;
Expand Down

0 comments on commit 39ebfea

Please sign in to comment.