Apollo 11.0
自动驾驶开放平台
apollo::prediction::network::Concatenate类 参考

concatenates a vector of inputs, return a single matrix. 更多...

#include <net_layer.h>

类 apollo::prediction::network::Concatenate 继承关系图:
apollo::prediction::network::Concatenate 的协作图:

Public 成员函数

bool Load (const apollo::prediction::LayerParameter &layer_pb) override
 Load the layer parameter from a pb message
 
void Run (const std::vector< Eigen::MatrixXf > &inputs, Eigen::MatrixXf *output) override
 Compute the layer output from inputs
 
- Public 成员函数 继承自 apollo::prediction::network::Layer
 Layer ()=default
 Constructor
 
virtual ~Layer ()=default
 Destructor
 
virtual void ResetState ()
 Reset the internal state of a layer such as LSTM, GRU
 
virtual void SetState (const std::vector< Eigen::MatrixXf > &states)
 Set the internal state of a layer
 
virtual void State (std::vector< Eigen::MatrixXf > *states) const
 Access to the internal state of a layer
 
std::string Name () const
 Name of a layer
 
int OrderNumber () const
 Order number of a layer in a network
 

详细描述

concatenates a vector of inputs, return a single matrix.

在文件 net_layer.h444 行定义.

成员函数说明

◆ Load()

bool apollo::prediction::network::Concatenate::Load ( const apollo::prediction::LayerParameter &  layer_pb)
overridevirtual

Load the layer parameter from a pb message

参数
Apb message contains the parameters
返回
True is loaded successively, otherwise False

重载 apollo::prediction::network::Layer .

在文件 net_layer.cc541 行定义.

541 {
542 if (!Layer::Load(layer_pb)) {
543 AERROR << "Fail to Load the layer parameters!";
544 return false;
545 }
546 ConcatenateParameter concat_pb = layer_pb.concatenate();
547 if (!concat_pb.has_axis()) {
548 AERROR << "Fail to Load the concatenate!";
549 return false;
550 }
551 axis_ = concat_pb.axis();
552 return true;
553}
virtual bool Load(const apollo::prediction::LayerParameter &layer_pb)
Load layer parameters from a protobuf message
Definition net_layer.cc:32
#define AERROR
Definition log.h:44

◆ Run()

void apollo::prediction::network::Concatenate::Run ( const std::vector< Eigen::MatrixXf > &  inputs,
Eigen::MatrixXf *  output 
)
overridevirtual

Compute the layer output from inputs

参数
Inputsto a network layer
Outputof a network layer will be returned

实现了 apollo::prediction::network::Layer.

在文件 net_layer.cc555 行定义.

556 {
557 CHECK_EQ(inputs.size(), 2U);
558 CHECK_EQ(inputs[0].rows(), inputs[1].rows());
559 output->resize(inputs[0].rows(), inputs[0].cols() + inputs[1].cols());
560 *output << inputs[0], inputs[1];
561}

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