Apollo 11.0
自动驾驶开放平台
apollo::perception::inference::Inference类 参考abstract

#include <inference.h>

类 apollo::perception::inference::Inference 继承关系图:
apollo::perception::inference::Inference 的协作图:

Public 成员函数

 Inference ()=default
 
virtual ~Inference ()=default
 
virtual bool Init (const std::map< std::string, std::vector< int > > &shapes)=0
 
virtual void Infer ()=0
 
virtual base::BlobPtr< float > get_blob (const std::string &name)=0
 
virtual void SetStream (cudaStream_t stream)
 
void set_max_batch_size (const int &batch_size)
 
void set_gpu_id (const int &gpu_id)
 
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)
 

Protected 属性

int max_batch_size_ = 1
 
int gpu_id_ = 0
 
std::string proto_file_ = ""
 
std::vector< std::string > net_output_names_
 
std::vector< std::string > net_input_names_
 

详细描述

在文件 inference.h 第 41 行定义.

构造及析构函数说明

◆ Inference()

apollo::perception::inference::Inference::Inference ( )
default

◆ ~Inference()

virtual apollo::perception::inference::Inference::~Inference ( )
virtualdefault

成员函数说明

◆ get_blob()

◆ Infer()

◆ Init()

◆ set_gpu_id()

void apollo::perception::inference::Inference::set_gpu_id ( const int &  gpu_id)

在文件 inference.cc 第 27 行定义.

◆ set_max_batch_size()

void apollo::perception::inference::Inference::set_max_batch_size ( const int &  batch_size)

在文件 inference.cc 第 23 行定义.

23 {
24 max_batch_size_ = batch_size;
25}

◆ set_model_info()

void apollo::perception::inference::Inference::set_model_info ( const std::string &  proto_file,
const std::vector< std::string > &  net_input_names,
const std::vector< std::string > &  net_output_names 
)

在文件 inference.cc 第 29 行定义.

32 {
33 proto_file_ = proto_file;
34 net_input_names_ = net_input_names;
35 net_output_names_ = net_output_names;
36 }
std::vector< std::string > net_input_names_
Definition inference.h:68
std::vector< std::string > net_output_names_
Definition inference.h:67

◆ SetStream()

virtual void apollo::perception::inference::Inference::SetStream ( cudaStream_t  stream)
inlinevirtual

被 apollo::perception::inference::MultiBatchInference 重载.

在文件 inference.h 第 53 行定义.

53{}

类成员变量说明

◆ gpu_id_

int apollo::perception::inference::Inference::gpu_id_ = 0
protected

在文件 inference.h 第 65 行定义.

◆ max_batch_size_

int apollo::perception::inference::Inference::max_batch_size_ = 1
protected

在文件 inference.h 第 64 行定义.

◆ net_input_names_

std::vector<std::string> apollo::perception::inference::Inference::net_input_names_
protected

在文件 inference.h 第 68 行定义.

◆ net_output_names_

std::vector<std::string> apollo::perception::inference::Inference::net_output_names_
protected

在文件 inference.h 第 67 行定义.

◆ proto_file_

std::string apollo::perception::inference::Inference::proto_file_ = ""
protected

在文件 inference.h 第 66 行定义.


该类的文档由以下文件生成: