Modify output log in simple_model (#359)
author장지섭/동작제어Lab(SR)/Engineer/삼성전자 <jiseob.jang@samsung.com>
Mon, 2 Apr 2018 02:53:03 +0000 (11:53 +0900)
committer최형규/동작제어Lab(SR)/Senior Engineer/삼성전자 <hk0110.choi@samsung.com>
Mon, 2 Apr 2018 02:53:03 +0000 (11:53 +0900)
This commit modifies output log in simple_model.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
src/runtime/ref/nn/runtime/sample/simple_model.cpp
src/runtime/ref/nn/runtime/sample/simple_model_main.cpp

index 7416730..86d34db 100644 (file)
@@ -441,7 +441,7 @@ bool SimpleModel::Compute(float inputValue1, float inputValue2,
         float delta = outputTensorPtr[idx] - goldenRef;
         delta = (delta < 0.0f) ? (-delta) : delta;
         if (delta > FLOAT_EPISILON) {
-            std::cerr << "Output computation Error: output0(" << outputTensorPtr[0]
+            std::cerr << "Output computation Error: output" << idx  << "("  << outputTensorPtr[idx]
                       << "), delta(" << delta
                       << ") @ idx(" << idx
                       << ")" << std::endl;
index 9417f05..edb6f0f 100644 (file)
@@ -27,7 +27,7 @@ int main()
     float result = 0.0f;
     nn_model->Compute(input1, input2, &result);
 
-    std::cout << "result : " << std::endl;
+    std::cout << "result : " << result << std::endl;
 
     delete(nn_model);