Deep Learning Algorithm Implementations 1.0.0
C++ implementations of fundamental deep learning algorithms
Loading...
Searching...
No Matches
dl::layers::Sigmoid< T > Class Template Reference

Sigmoid activation function. More...

#include <layers.hpp>

Inheritance diagram for dl::layers::Sigmoid< T >:
Collaboration diagram for dl::layers::Sigmoid< T >:

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.
 
- Public Member Functions inherited from dl::layers::Module< T >
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

- Protected Attributes inherited from dl::layers::Module< T >
bool training_ = true
 

Detailed Description

template<typename T>
class dl::layers::Sigmoid< T >

Sigmoid activation function.

Definition at line 134 of file layers.hpp.

Member Function Documentation

◆ forward()

template<typename T >
Variable< T > dl::layers::Sigmoid< T >::forward ( const Variable< T > &  input)
overridevirtual

Forward pass through the module.

Parameters
inputInput variable
Returns
Output variable

Implements dl::layers::Module< T >.

Definition at line 75 of file layers.cpp.

◆ parameters()

template<typename T >
std::vector< Variable< T > * > dl::layers::Sigmoid< T >::parameters ( )
inlineoverridevirtual

Get all parameters of this module.

Returns
Vector of parameter variables

Implements dl::layers::Module< T >.

Definition at line 137 of file layers.hpp.


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