Apollo 11.0
自动驾驶开放平台
inference.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
18
19namespace apollo {
20namespace perception {
21namespace inference {
22
23void Inference::set_max_batch_size(const int &batch_size) {
24 max_batch_size_ = batch_size;
25}
26
27void Inference::set_gpu_id(const int &gpu_id) { gpu_id_ = gpu_id; }
28
30 const std::string &proto_file,
31 const std::vector<std::string> &net_input_names,
32 const std::vector<std::string> &net_output_names) {
33 proto_file_ = proto_file;
34 net_input_names_ = net_input_names;
35 net_output_names_ = net_output_names;
36 }
37
38} // namespace inference
39} // namespace perception
40} // namespace apollo
std::vector< std::string > net_input_names_
Definition inference.h:68
std::vector< std::string > net_output_names_
Definition inference.h:67
void set_model_info(const std::string &proto_file, const std::vector< std::string > &net_input_names, const std::vector< std::string > &net_output_names)
Definition inference.cc:29
void set_max_batch_size(const int &batch_size)
Definition inference.cc:23
void set_gpu_id(const int &gpu_id)
Definition inference.cc:27
class register implement
Definition arena_queue.h:37