Apollo
6.0
Open source self driving car software
|
Layer is a base class for specific network layers It contains a pure virtual function Run which must be implemented in derived class. More...
#include <net_layer.h>
Public Member Functions | |
Layer ()=default | |
Constructor. More... | |
virtual | ~Layer ()=default |
Destructor. More... | |
virtual bool | Load (const apollo::prediction::LayerParameter &layer_pb) |
Load layer parameters from a protobuf message. More... | |
virtual void | ResetState () |
Reset the internal state of a layer such as LSTM, GRU. More... | |
virtual void | SetState (const std::vector< Eigen::MatrixXf > &states) |
Set the internal state of a layer. More... | |
virtual void | State (std::vector< Eigen::MatrixXf > *states) const |
Access to the internal state of a layer. More... | |
virtual void | Run (const std::vector< Eigen::MatrixXf > &inputs, Eigen::MatrixXf *output)=0 |
Compute the layer output from inputs. More... | |
std::string | Name () const |
Name of a layer. More... | |
int | OrderNumber () const |
Order number of a layer in a network. More... | |
Layer is a base class for specific network layers It contains a pure virtual function Run which must be implemented in derived class.
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
virtual |
Load layer parameters from a protobuf message.
LayerParameter | is a protobuf message |
Reimplemented in apollo::prediction::network::Concatenate, apollo::prediction::network::Input, apollo::prediction::network::Flatten, apollo::prediction::network::LSTM, apollo::prediction::network::BatchNormalization, apollo::prediction::network::Activation, apollo::prediction::network::AvgPool1d, apollo::prediction::network::MaxPool1d, apollo::prediction::network::Conv1d, and apollo::prediction::network::Dense.
|
inline |
Name of a layer.
|
inline |
Order number of a layer in a network.
|
inlinevirtual |
Reset the internal state of a layer such as LSTM, GRU.
Reimplemented in apollo::prediction::network::LSTM.
|
pure virtual |
Compute the layer output from inputs.
Inputs | to a network layer |
Output | of a network layer will be returned |
Implemented in apollo::prediction::network::Concatenate, apollo::prediction::network::Input, apollo::prediction::network::Flatten, apollo::prediction::network::LSTM, apollo::prediction::network::BatchNormalization, apollo::prediction::network::Activation, apollo::prediction::network::AvgPool1d, apollo::prediction::network::MaxPool1d, apollo::prediction::network::Conv1d, and apollo::prediction::network::Dense.
|
inlinevirtual |
Set the internal state of a layer.
A | specified internal state in a vector of Eigen::MatrixXf |
Reimplemented in apollo::prediction::network::LSTM.
|
inlinevirtual |
Access to the internal state of a layer.
Reimplemented in apollo::prediction::network::LSTM.