FNN 1.0.0
Toolbox to use NNs in Fortran.
|
Module dedicated to the class tanhactivation. More...
Data Types | |
type | tanhactivation |
Implements a tanh activation function. More... | |
Functions/Subroutines | |
type(tanhactivation) function, public | construct_tanh_activation (self_size, batch_size) |
Constructor for class tanhactivation. More... | |
subroutine | tanh_tofile (self, unit_num) |
Implements tanhactivation::tofile. More... | |
subroutine | tanh_apply_forward (self, member, z, y) |
Implements tanhactivation::apply_forward. More... | |
Module dedicated to the class tanhactivation.
type(tanhactivation) function, public fnn_activation_tanh::construct_tanh_activation | ( | integer(ik), intent(in) | self_size, |
integer(ik), intent(in) | batch_size | ||
) |
Constructor for class tanhactivation.
[in] | self_size | The value for linearactivation::self_size. |
[in] | batch_size | The value for linearactivation::batch_size. |
|
private |
Implements tanhactivation::apply_forward.
Applies and linearises the activation function.
The activation function reads
and the associated linearisation reads
Note
Input parameter member
should be less than linearactivation::batch_size.
The linarisation is stored in nonlinearactivation::z_prime, which is why the intent of self
is declared inout
.
[in,out] | self | The activation function. |
[in] | member | The index inside the batch. |
[in] | z | The input of the activation function. |
[out] | y | The output of the activation function. |
|
private |
Implements tanhactivation::tofile.
Saves the activation function.
[in] | self | The activation function to save. |
[in] | unit_num | The unit number for the write statement. |