Skip to content

Commit 04ab99c

Browse files
authored
Merge pull request #3340 from ivikhrev/fix
fix warning
2 parents f21f6d0 + 250d0a4 commit 04ab99c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demos/common/cpp/models/src/classification_model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ std::unique_ptr<ResultBase> ClassificationModel::postprocess(InferenceResult& in
4343
result->topLabels.reserve(scoresTensor.get_size());
4444
for (size_t i = 0; i < scoresTensor.get_size(); ++i) {
4545
int ind = indicesPtr[i];
46-
if (ind < 0 || ind >= labels.size()) {
46+
if (ind < 0 || ind >= (int)labels.size()) {
4747
throw std::runtime_error("Invalid index for the class label is found during postprocessing");
4848
}
4949
result->topLabels.emplace_back(ind, labels[ind], scoresPtr[i]);

0 commit comments

Comments
 (0)