| 73 | } |
| 74 | |
| 75 | bool ModelServer::LoadGraph(const std::string& file) { |
| 76 | graph_.reset(new Graph); |
| 77 | if (!graph_->Load(file)) { |
| 78 | return false; |
| 79 | } |
| 80 | DXCHECK(graph_->target_size() > target_type_); |
| 81 | target_name_ = graph_->target(target_type_).name(); |
| 82 | return true; |
| 83 | } |
| 84 | |
| 85 | bool ModelServer::LoadModel(const std::string& file) { |
| 86 | model_.reset(new Model); |