24#include "modules/prediction/proto/network_model.pb.h"
57 virtual void Run(
const std::vector<Eigen::MatrixXf>& inputs,
58 Eigen::MatrixXf* output)
const = 0;
64 virtual void SetState(
const std::vector<Eigen::MatrixXf>& states) {}
70 virtual void State(std::vector<Eigen::MatrixXf>* states)
const {}
95 const std::string&
Name()
const;
NetModel is a base class for specific network model It contains a pure virtual function Run which mus...
const std::string & Name() const
Name of a network model
virtual void ResetState() const
Set the internal state of a model
std::string PerformanceString() const
Shows the performance information of a network
virtual void Run(const std::vector< Eigen::MatrixXf > &inputs, Eigen::MatrixXf *output) const =0
Compute the model output from inputs
bool IsOk() const
Indicate the state of a network model
bool LoadModel(const NetParameter &net_parameter)
Load network parameters from a protobuf message
virtual void SetState(const std::vector< Eigen::MatrixXf > &states)
Set the internal state of a network model
NetParameter net_parameter_
virtual ~NetModel()=default
Destructor
virtual void State(std::vector< Eigen::MatrixXf > *states) const
Access to the internal state of a network model
int Id() const
Id of a network model
NetModel()=default
Constructor
std::vector< std::unique_ptr< Layer > > layers_