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
17
#include "
modules/perception/common/inference/inference.h
"
18
19
namespace
apollo
{
20
namespace
perception {
21
namespace
inference {
22
23
void
Inference::set_max_batch_size
(
const
int
&batch_size) {
24
max_batch_size_
= batch_size;
25
}
26
27
void
Inference::set_gpu_id
(
const
int
&gpu_id) {
gpu_id_
= gpu_id; }
28
29
void
Inference::set_model_info
(
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
apollo::perception::inference::Inference::net_input_names_
std::vector< std::string > net_input_names_
Definition
inference.h:68
apollo::perception::inference::Inference::max_batch_size_
int max_batch_size_
Definition
inference.h:64
apollo::perception::inference::Inference::gpu_id_
int gpu_id_
Definition
inference.h:65
apollo::perception::inference::Inference::net_output_names_
std::vector< std::string > net_output_names_
Definition
inference.h:67
apollo::perception::inference::Inference::set_model_info
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
apollo::perception::inference::Inference::set_max_batch_size
void set_max_batch_size(const int &batch_size)
Definition
inference.cc:23
apollo::perception::inference::Inference::set_gpu_id
void set_gpu_id(const int &gpu_id)
Definition
inference.cc:27
apollo::perception::inference::Inference::proto_file_
std::string proto_file_
Definition
inference.h:66
inference.h
apollo
class register implement
Definition
arena_queue.h:37
modules
perception
common
inference
inference.cc