From 4848f5c81f55dd420f610be677927691458efad1 Mon Sep 17 00:00:00 2001 From: yuzhenhua Date: Wed, 14 Apr 2021 15:25:34 +0800 Subject: [PATCH] modify log format for 310 inferenct --- model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc | 2 +- model_zoo/official/cv/faster_rcnn/ascend310_infer/src/main.cpp | 2 +- model_zoo/official/cv/maskrcnn/ascend310_infer/src/main.cpp | 2 +- model_zoo/official/cv/resnet/ascend310_infer/src/main.cc | 2 +- model_zoo/official/cv/ssd/ascend310_infer/src/main.cc | 2 +- model_zoo/official/cv/unet/ascend310_infer/src/main.cc | 2 +- model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc | 2 +- .../recommend/naml/ascend310_infer/src/model_process.cpp | 2 +- .../recommend/naml/ascend310_infer/src/sample_process.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc b/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc index 93854ee1f6..66532a03b7 100644 --- a/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc @@ -143,7 +143,7 @@ int main(int argc, char **argv) { average = average/infer_cnt; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); std::ofstream file_stream(file_name.c_str(), std::ios::trunc); diff --git a/model_zoo/official/cv/faster_rcnn/ascend310_infer/src/main.cpp b/model_zoo/official/cv/faster_rcnn/ascend310_infer/src/main.cpp index 43220a85fb..f9f9cd6620 100755 --- a/model_zoo/official/cv/faster_rcnn/ascend310_infer/src/main.cpp +++ b/model_zoo/official/cv/faster_rcnn/ascend310_infer/src/main.cpp @@ -122,7 +122,7 @@ int main(int argc, char* argv[]) { average = average / infer_cnt; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); diff --git a/model_zoo/official/cv/maskrcnn/ascend310_infer/src/main.cpp b/model_zoo/official/cv/maskrcnn/ascend310_infer/src/main.cpp index 1954feedad..9097ae1fe2 100755 --- a/model_zoo/official/cv/maskrcnn/ascend310_infer/src/main.cpp +++ b/model_zoo/official/cv/maskrcnn/ascend310_infer/src/main.cpp @@ -119,7 +119,7 @@ int main(int argc, char* argv[]) { } average = average / infer_cnt; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); std::ofstream file_stream(file_name.c_str(), std::ios::trunc); diff --git a/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc b/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc index ac56a24dcf..5bfaf218f0 100644 --- a/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc @@ -137,7 +137,7 @@ int main(int argc, char **argv) { } average = average / inferCount; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << inferCount << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; std::string fileName = "./time_Result" + std::string("/test_perform_static.txt"); std::ofstream fileStream(fileName.c_str(), std::ios::trunc); diff --git a/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc b/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc index 8bc8a2ab1c..6a361815d2 100644 --- a/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc @@ -154,7 +154,7 @@ int main(int argc, char **argv) { } average = average / inferCount; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << inferCount << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << inferCount << std::endl; std::string fileName = "./time_Result" + std::string("/test_perform_static.txt"); std::ofstream fileStream(fileName.c_str(), std::ios::trunc); diff --git a/model_zoo/official/cv/unet/ascend310_infer/src/main.cc b/model_zoo/official/cv/unet/ascend310_infer/src/main.cc index 7ef3d1c750..cfb4e971a4 100644 --- a/model_zoo/official/cv/unet/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/unet/ascend310_infer/src/main.cc @@ -138,7 +138,7 @@ int main(int argc, char **argv) { } average = average/infer_cnt; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); std::ofstream file_stream(file_name.c_str(), std::ios::trunc); diff --git a/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc b/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc index 25d7ffa357..11bf2a836b 100644 --- a/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc @@ -143,7 +143,7 @@ int main(int argc, char **argv) { } average = average/infer_cnt; std::stringstream timeCost; - timeCost << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; + timeCost << "NN inference cost average time: "<< average << " ms of infer_count " << infer_cnt << std::endl; std::cout << "NN inference cost average time: "<< average << "ms of infer_count " << infer_cnt << std::endl; std::string file_name = "./time_Result" + std::string("/test_perform_static.txt"); std::ofstream file_stream(file_name.c_str(), std::ios::trunc); diff --git a/model_zoo/official/recommend/naml/ascend310_infer/src/model_process.cpp b/model_zoo/official/recommend/naml/ascend310_infer/src/model_process.cpp index 63b5f1208d..28fa43c4f9 100644 --- a/model_zoo/official/recommend/naml/ascend310_infer/src/model_process.cpp +++ b/model_zoo/official/recommend/naml/ascend310_infer/src/model_process.cpp @@ -547,7 +547,7 @@ std::string ModelProcess::GetCostTimeInfo() { average = average / infer_cnt; std::stringstream timeCost; - timeCost << "first model latency "<< average << "ms; count " << infer_cnt << std::endl; + timeCost << "first model latency "<< average << " ms; count " << infer_cnt << std::endl; return timeCost.str(); } diff --git a/model_zoo/official/recommend/naml/ascend310_infer/src/sample_process.cpp b/model_zoo/official/recommend/naml/ascend310_infer/src/sample_process.cpp index 52d526454e..9e5614bf0c 100644 --- a/model_zoo/official/recommend/naml/ascend310_infer/src/sample_process.cpp +++ b/model_zoo/official/recommend/naml/ascend310_infer/src/sample_process.cpp @@ -347,7 +347,7 @@ std::vector SampleProcess::GetModelExecCostTimeInfo() { secondModelAverage = secondModelAverage / infer_cnt; std::stringstream timeCost; timeCost << "second model inference cost average time: "<< secondModelAverage << - "ms of infer_count " << infer_cnt << std::endl; + " ms of infer_count " << infer_cnt << std::endl; result.emplace_back(timeCost.str()); double totalCostTime;