mv_machine_learning: rename 'output' to 'tensor'
authorInki Dae <inki.dae@samsung.com>
Mon, 13 Feb 2023 07:27:27 +0000 (16:27 +0900)
committerKwanghoon Son <k.son@samsung.com>
Fri, 3 Mar 2023 08:11:58 +0000 (17:11 +0900)
[Issue type] : code cleanup

Change-Id: Id68c76c5ddc46d13036ea163e19a5e52e54b181b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
mv_machine_learning/image_classification/include/image_classification.h
mv_machine_learning/image_classification/src/image_classification.cpp
mv_machine_learning/object_detection/include/object_detection.h
mv_machine_learning/object_detection/src/object_detection.cpp

index d39a1b3..219e566 100644 (file)
@@ -50,7 +50,7 @@ protected:
        int _targetDeviceType;
 
        void getOutputNames(std::vector<std::string> &names);
-       void getOutpuTensor(std::string &target_name, std::vector<float> &output);
+       void getOutpuTensor(std::string &target_name, std::vector<float> &tensor);
 
 public:
        ImageClassification();
index b4393cd..0a92d44 100644 (file)
@@ -189,7 +189,7 @@ void ImageClassification::getOutputNames(vector<string> &names)
                names.push_back(it->first);
 }
 
-void ImageClassification::getOutpuTensor(string &target_name, vector<float> &output)
+void ImageClassification::getOutpuTensor(string &target_name, vector<float> &tensor)
 {
        LOGI("ENTER");
 
@@ -201,7 +201,7 @@ void ImageClassification::getOutpuTensor(string &target_name, vector<float> &out
 
        auto raw_buffer = static_cast<float *>(tensor_buffer->buffer);
 
-       copy(&raw_buffer[0], &raw_buffer[tensor_buffer->size / sizeof(float)], back_inserter(output));
+       copy(&raw_buffer[0], &raw_buffer[tensor_buffer->size / sizeof(float)], back_inserter(tensor));
 
        LOGI("LEAVE");
 }
index 889a2cc..30a79c2 100644 (file)
@@ -45,7 +45,7 @@ protected:
        int _targetDeviceType;
 
        void getOutputNames(std::vector<std::string> &names);
-       void getOutputTensor(std::string &target_name, std::vector<float> &output);
+       void getOutputTensor(std::string &target_name, std::vector<float> &tensor);
 
 public:
        ObjectDetection();
index b75e82b..d6854db 100644 (file)
@@ -143,7 +143,7 @@ void ObjectDetection::getOutputNames(vector<string> &names)
                names.push_back(it->first);
 }
 
-void ObjectDetection::getOutputTensor(string &target_name, vector<float> &output)
+void ObjectDetection::getOutputTensor(string &target_name, vector<float> &tensor)
 {
        LOGI("ENTER");
 
@@ -155,7 +155,7 @@ void ObjectDetection::getOutputTensor(string &target_name, vector<float> &output
 
        auto raw_buffer = static_cast<float *>(tensor_buffer->buffer);
 
-       copy(&raw_buffer[0], &raw_buffer[tensor_buffer->size / sizeof(float)], back_inserter(output));
+       copy(&raw_buffer[0], &raw_buffer[tensor_buffer->size / sizeof(float)], back_inserter(tensor));
 
        LOGI("LEAVE");
 }