Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::prediction::network::Layer Class Referenceabstract

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>

Inheritance diagram for apollo::prediction::network::Layer:
Inheritance graph
Collaboration diagram for apollo::prediction::network::Layer:
Collaboration graph

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...
 

Detailed Description

Layer is a base class for specific network layers It contains a pure virtual function Run which must be implemented in derived class.

Constructor & Destructor Documentation

◆ Layer()

apollo::prediction::network::Layer::Layer ( )
default

Constructor.

◆ ~Layer()

virtual apollo::prediction::network::Layer::~Layer ( )
virtualdefault

Destructor.

Member Function Documentation

◆ Load()

virtual bool apollo::prediction::network::Layer::Load ( const apollo::prediction::LayerParameter &  layer_pb)
virtual

◆ Name()

std::string apollo::prediction::network::Layer::Name ( ) const
inline

Name of a layer.

Returns
Name of a layer

◆ OrderNumber()

int apollo::prediction::network::Layer::OrderNumber ( ) const
inline

Order number of a layer in a network.

Returns
Order numer of a layer in a network

◆ ResetState()

virtual void apollo::prediction::network::Layer::ResetState ( )
inlinevirtual

Reset the internal state of a layer such as LSTM, GRU.

Reimplemented in apollo::prediction::network::LSTM.

◆ Run()

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

◆ SetState()

virtual void apollo::prediction::network::Layer::SetState ( const std::vector< Eigen::MatrixXf > &  states)
inlinevirtual

Set the internal state of a layer.

Parameters
Aspecified internal state in a vector of Eigen::MatrixXf

Reimplemented in apollo::prediction::network::LSTM.

◆ State()

virtual void apollo::prediction::network::Layer::State ( std::vector< Eigen::MatrixXf > *  states) const
inlinevirtual

Access to the internal state of a layer.

Returns
Internal state in a vector of Eigen::MatrixXf

Reimplemented in apollo::prediction::network::LSTM.


The documentation for this class was generated from the following file: