Skip to content

Commit

Permalink
Fix: throw error on NCNN extraction fail
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinB committed Dec 18, 2018
1 parent 6b34a44 commit 569800a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/backends/ncnn/ncnnlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ namespace dd
bbox = true;

// Extract detection or classification
int ret = 0;
if (bbox == true) {
ex.extract("detection_out", inputc._out);
ret = ex.extract("detection_out", inputc._out);
} else {
ex.extract("prob", inputc._out);
ret = ex.extract("prob", inputc._out);
}
if (ret == -1) {
throw MLLibInternalException("NCNN internal error");
}

std::vector<APIData> vrad;
Expand Down

0 comments on commit 569800a

Please sign in to comment.