Deep Learning Algorithm Implementations 1.0.0
C++ implementations of fundamental deep learning algorithms
|
Tanh activation function. More...
#include <layers.hpp>
Public Member Functions | |
Variable< T > | forward (const Variable< T > &input) override |
Forward pass through the module. | |
std::vector< Variable< T > * > | parameters () override |
Get all parameters of this module. | |
![]() | |
virtual | ~Module ()=default |
virtual void | zero_grad () |
Zero gradients of all parameters. | |
virtual void | train (bool training=true) |
Set training mode. | |
virtual void | eval () |
Set evaluation mode. | |
bool | is_training () const |
Check if module is in training mode. | |
Additional Inherited Members | |
![]() | |
bool | training_ = true |
Tanh activation function.
Definition at line 144 of file layers.hpp.
|
overridevirtual |
Forward pass through the module.
input | Input variable |
Implements dl::layers::Module< T >.
Definition at line 82 of file layers.cpp.
|
inlineoverridevirtual |
Get all parameters of this module.
Implements dl::layers::Module< T >.
Definition at line 147 of file layers.hpp.