|
FNN 1.0.0
Toolbox to use NNs in Fortran.
|
Module dedicated to the class nonlinearactivation. More...
Data Types | |
| type | nonlinearactivation |
| Base class for nonlinear activation functions. Do not instanciate. More... | |
Functions/Subroutines | |
| type(nonlinearactivation) function, public | construct_nonlinear_activation (self_size, batch_size) |
| Constructor for class nonlinearactivation. More... | |
| subroutine | nonlinear_apply_tangent_linear (self, member, dz, dy) |
| Implements nonlinearactivation::apply_tangent_linear. More... | |
| subroutine | nonlinear_apply_adjoint (self, member, dy, dz) |
| Implements nonlinearactivation::apply_adjoint. More... | |
Module dedicated to the class nonlinearactivation.
| type(nonlinearactivation) function, public fnn_activation_nonlinear::construct_nonlinear_activation | ( | integer(ik), intent(in) | self_size, |
| integer(ik), intent(in) | batch_size | ||
| ) |
Constructor for class nonlinearactivation.
| [in] | self_size | The value for linearactivation::self_size. |
| [in] | batch_size | The value for linearactivation::batch_size. |
|
private |
Implements nonlinearactivation::apply_adjoint.
Applies the adjoint of the activation function.
The adjoint operator reads
![\[ d\mathbf{z} = \mathbf{A}(\mathbf{z})^\top d\mathbf{y}.\]](form_5.png)
Note
In principle, this method should only be called after linearactivation::apply_forward, where the linearisation is computed.
| [in] | self | The activation function. |
| [in] | member | The index inside the batch. |
| [in] | dy | The input of the adjoint operator. |
| [out] | dz | The output of the adjoint operator. |
|
private |
Implements nonlinearactivation::apply_tangent_linear.
Applies the TL of the activation function.
The TL operator reads
![\[ d\mathbf{y} = \mathbf{A}(\mathbf{z}) d\mathbf{z}.\]](form_4.png)
Note
In principle, this method should only be called after linearactivation::apply_forward, where the linearisation is computed.
| [in] | self | The activation function. |
| [in] | member | The index inside the batch. |
| [in] | dz | The input of the TL operator. |
| [out] | dy | The output of the TL operator. |