NNFS
Neural network library from scratch
Loading...
Searching...
No Matches
NNFS::Tanh Class Reference

#include <Tanh.hpp>

Inheritance diagram for NNFS::Tanh:
[legend]

Public Member Functions

 Tanh ()
 
void forward (Eigen::MatrixXd &out, const Eigen::MatrixXd &x) override
 Forward pass of the layer.
 
void backward (Eigen::MatrixXd &out, const Eigen::MatrixXd &dx) override
 Backward pass of the layer.
 
- Public Member Functions inherited from NNFS::Activation
 Activation (ActivationType activation_type)
 Construct a new Activation object.
 
- Public Member Functions inherited from NNFS::Layer
 Layer (LayerType type)
 Construct a new Layer object.
 
virtual ~Layer ()=default
 Basic destructor.
 
virtual void forward (Eigen::MatrixXd &out, const Eigen::MatrixXd &x)=0
 Forward pass of the layer.
 
virtual void backward (Eigen::MatrixXd &out, const Eigen::MatrixXd &dx)=0
 Backward pass of the layer.
 

Additional Inherited Members

- Public Attributes inherited from NNFS::Activation
ActivationType activation_type
 
- Public Attributes inherited from NNFS::Layer
LayerType type
 
- Protected Attributes inherited from NNFS::Activation
Eigen::MatrixXd _forward_input
 

Constructor & Destructor Documentation

◆ Tanh()

NNFS::Tanh::Tanh ( )
inline

Member Function Documentation

◆ backward()

void NNFS::Tanh::backward ( Eigen::MatrixXd &  out,
const Eigen::MatrixXd &  dx 
)
inlineoverridevirtual

Backward pass of the layer.

Parameters
[out]outInput gradient
[in]dxOutput gradient

Implements NNFS::Layer.

◆ forward()

void NNFS::Tanh::forward ( Eigen::MatrixXd &  out,
const Eigen::MatrixXd &  x 
)
inlineoverridevirtual

Forward pass of the layer.

Parameters
[out]outOutput data
[in]xInput data

Implements NNFS::Layer.


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