[ahub] fix ahub issues
authorSeungbaek Hong <sb92.hong@samsung.com>
Wed, 19 Jul 2023 02:21:02 +0000 (11:21 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 21 Aug 2023 06:29:23 +0000 (15:29 +0900)
Fix some issues of svace and coverity.

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Seungbaek Hong <sb92.hong@samsung.com>
nntrainer/tensor/tensor.cpp

index 52fdc8c..d2ac335 100644 (file)
@@ -2694,7 +2694,7 @@ void Tensor::print_(std::ostream &out, uint opt) const {
           for (unsigned int j = 0; j < height(); j++) {
             out << "{";
             for (unsigned int l = 0; l < width(); l++) {
-              if (l < channel() - 1)
+              if (l < width() - 1)
                 out << std::setw(10) << std::setprecision(10)
                     << this->getValue<float>(k, l, i, j) << ", ";
               else