MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / print_res

Function print_res

tools/cpp_examples/demo-client/src/dense_format.cpp:45–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void print_res(const Request& req,
46 const Response& res,
47 std::string route_tag,
48 uint64_t elapse_ms) {
49 for (uint32_t i = 0; i < res.predictions_size(); ++i) {
50 const DensePrediction& prediction = res.predictions(i);
51 std::ostringstream oss;
52 for (uint32_t j = 0; j < prediction.categories_size(); ++j) {
53 oss << prediction.categories(j) << " ";
54 }
55 LOG(INFO) << "Receive result " << oss.str();
56 }
57
58 LOG(INFO) << "Succ call predictor[dense_format], the tag is: " << route_tag
59 << ", elapse_ms: " << elapse_ms;
60}
61
62int main(int argc, char** argv) {
63 PredictorApi api;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected