My Project
Public Member Functions | List of all members
cpu_mlp::Layer Class Referenceabstract

Abstract layer interface. More...

#include <layer.hpp>

Inheritance diagram for cpu_mlp::Layer:
Inheritance graph
[legend]

Public Member Functions

virtual ~Layer ()=default
 
virtual void bind (double *params, double *grads)=0
 Bind parameter and gradient storage. More...
 
virtual void forward (const Eigen::MatrixXd &input, Eigen::MatrixXd &output)=0
 Forward pass for a batch. More...
 
virtual void backward (const Eigen::MatrixXd &next_grad, Eigen::MatrixXd *prev_grad)=0
 Backward pass for a batch. More...
 
virtual int getInSize () const =0
 Input dimension. More...
 
virtual int getOutSize () const =0
 Output dimension. More...
 
virtual int getParamsSize () const =0
 Parameter count. More...
 
virtual double getInitStdDev () const =0
 Initialization scale. More...
 

Detailed Description

Abstract layer interface.

Constructor & Destructor Documentation

◆ ~Layer()

virtual cpu_mlp::Layer::~Layer ( )
virtualdefault

Member Function Documentation

◆ backward()

virtual void cpu_mlp::Layer::backward ( const Eigen::MatrixXd &  next_grad,
Eigen::MatrixXd *  prev_grad 
)
pure virtual

Backward pass for a batch.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.

◆ bind()

virtual void cpu_mlp::Layer::bind ( double *  params,
double *  grads 
)
pure virtual

Bind parameter and gradient storage.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.

◆ forward()

virtual void cpu_mlp::Layer::forward ( const Eigen::MatrixXd &  input,
Eigen::MatrixXd &  output 
)
pure virtual

Forward pass for a batch.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.

◆ getInitStdDev()

virtual double cpu_mlp::Layer::getInitStdDev ( ) const
pure virtual

Initialization scale.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.

◆ getInSize()

virtual int cpu_mlp::Layer::getInSize ( ) const
pure virtual

Input dimension.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.

◆ getOutSize()

virtual int cpu_mlp::Layer::getOutSize ( ) const
pure virtual

Output dimension.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.

◆ getParamsSize()

virtual int cpu_mlp::Layer::getParamsSize ( ) const
pure virtual

Parameter count.

Implemented in cpu_mlp::DenseLayer< In, Out, Activation >.


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