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

For a step-by-step description of the algorithm, see this tutorial. More...

#include <net_layer.h>

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

Public Member Functions

bool Load (const apollo::prediction::LayerParameter &layer_pb) override
 Load the layer parameter from a pb message. More...
 
void Run (const std::vector< Eigen::MatrixXf > &inputs, Eigen::MatrixXf *output) override
 Compute the layer output from inputs. More...
 
void ResetState () override
 Reset the internal state and memory cell state as zero-matrix. More...
 
void SetState (const std::vector< Eigen::MatrixXf > &states) override
 Set the internal state and memory cell state. More...
 
void State (std::vector< Eigen::MatrixXf > *states) const override
 Access to the internal state and memory cell state. More...
 
- Public Member Functions inherited from apollo::prediction::network::Layer
 Layer ()=default
 Constructor. More...
 
virtual ~Layer ()=default
 Destructor. More...
 
std::string Name () const
 Name of a layer. More...
 
int OrderNumber () const
 Order number of a layer in a network. More...
 

Detailed Description

For a step-by-step description of the algorithm, see this tutorial.

Long-Short Term Memory unit - Hochreiter 1997.

Member Function Documentation

◆ Load()

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

Load the layer parameter from a pb message.

Parameters
Apb message contains the parameters
Returns
True is loaded successively, otherwise False

Reimplemented from apollo::prediction::network::Layer.

◆ ResetState()

void apollo::prediction::network::LSTM::ResetState ( )
overridevirtual

Reset the internal state and memory cell state as zero-matrix.

Reimplemented from apollo::prediction::network::Layer.

◆ Run()

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

Compute the layer output from inputs.

Parameters
Inputsto a network layer
Outputof a network layer will be returned

Implements apollo::prediction::network::Layer.

◆ SetState()

void apollo::prediction::network::LSTM::SetState ( const std::vector< Eigen::MatrixXf > &  states)
overridevirtual

Set the internal state and memory cell state.

Parameters
Avector of Eigen::MatrixXf

Reimplemented from apollo::prediction::network::Layer.

◆ State()

void apollo::prediction::network::LSTM::State ( std::vector< Eigen::MatrixXf > *  states) const
overridevirtual

Access to the internal state and memory cell state.

Returns
State in a vector of Eigen::MatrixXf

Reimplemented from apollo::prediction::network::Layer.


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