| 43 | } |
| 44 | |
| 45 | void 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 | |
| 62 | int main(int argc, char** argv) { |
| 63 | PredictorApi api; |