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

RnnModel is a derived class from NetModel, it has a specific layers structure. More...

#include <rnn_model.h>

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

Public Member Functions

void Run (const std::vector< Eigen::MatrixXf > &inputs, Eigen::MatrixXf *output) const override
 Compute the model output from inputs according to a defined layers' flow. More...
 
void SetState (const std::vector< Eigen::MatrixXf > &states) override
 Set the internal state of a network model. More...
 
void State (std::vector< Eigen::MatrixXf > *states) const override
 Access to the internal state of a network model. More...
 
void ResetState () const override
 Set the internal state of a model. More...
 
- Public Member Functions inherited from apollo::prediction::network::NetModel
 NetModel ()=default
 Constructor. More...
 
virtual ~NetModel ()=default
 Destructor. More...
 
bool LoadModel (const NetParameter &net_parameter)
 Load network parameters from a protobuf message. More...
 
std::string PerformanceString () const
 Shows the performance information of a network. More...
 
const std::string & Name () const
 Name of a network model. More...
 
int Id () const
 Id of a network model. More...
 
bool IsOk () const
 Indicate the state of a network model. More...
 

Additional Inherited Members

- Protected Attributes inherited from apollo::prediction::network::NetModel
std::vector< std::unique_ptr< Layer > > layers_
 
NetParameter net_parameter_
 
bool ok_ = false
 

Detailed Description

RnnModel is a derived class from NetModel, it has a specific layers structure.

Member Function Documentation

◆ ResetState()

void apollo::prediction::network::RnnModel::ResetState ( ) const
overridevirtual

Set the internal state of a model.

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

Reimplemented from apollo::prediction::network::NetModel.

◆ Run()

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

Compute the model output from inputs according to a defined layers' flow.

Parameters
Inputsto the network
Outputof the network will be returned

Implements apollo::prediction::network::NetModel.

◆ SetState()

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

Set the internal state of a network model.

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

Reimplemented from apollo::prediction::network::NetModel.

◆ State()

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

Access to the internal state of a network model.

Returns
Internal state in a vector of Eigen::MatrixXf of the model

Reimplemented from apollo::prediction::network::NetModel.


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