We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f21f6d0 + 250d0a4 commit 04ab99cCopy full SHA for 04ab99c
demos/common/cpp/models/src/classification_model.cpp
@@ -43,7 +43,7 @@ std::unique_ptr<ResultBase> ClassificationModel::postprocess(InferenceResult& in
43
result->topLabels.reserve(scoresTensor.get_size());
44
for (size_t i = 0; i < scoresTensor.get_size(); ++i) {
45
int ind = indicesPtr[i];
46
- if (ind < 0 || ind >= labels.size()) {
+ if (ind < 0 || ind >= (int)labels.size()) {
47
throw std::runtime_error("Invalid index for the class label is found during postprocessing");
48
}
49
result->topLabels.emplace_back(ind, labels[ind], scoresPtr[i]);
0 commit comments