Skip to content

Commit

Permalink
samples: fix klocwork beyond boundary issue (#5836)
Browse files Browse the repository at this point in the history
  • Loading branch information
generalova-kate authored May 26, 2021
1 parent b07bcfb commit f40ad26
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ class ClassificationResultT {

const auto result =
moutputHolder
.as<const InferenceEngine::PrecisionTrait<InferenceEngine::Precision::FP32>::value_type*>()[_results[id] +
.as<const InferenceEngine::PrecisionTrait<InferenceEngine::Precision::FP32>::value_type*>()[_results.at(id) +
image_id * (_outBlob->size() / _batchSize)];

std::cout << std::setw(static_cast<int>(_classidStr.length())) << std::left << _results[id] << " ";
std::cout << std::setw(static_cast<int>(_classidStr.length())) << std::left << _results.at(id) << " ";
std::cout << std::left << std::setw(static_cast<int>(_probabilityStr.length())) << std::fixed << result;

if (!_labels.empty()) {
Expand Down

0 comments on commit f40ad26

Please sign in to comment.