Get the number of parameters for fully connected layer
This function calculates the number of parameters for a fully connected layer. This procedure is based on code from the neural-fortran library
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(full_layer_type), | intent(in) | :: | this |
Instance of the fully connected layer |
Number of parameters
pure function get_num_params_full(this) result(num_params) !! Get the number of parameters for fully connected layer !! !! This function calculates the number of parameters for a fully connected !! layer. !! This procedure is based on code from the neural-fortran library implicit none ! Arguments class(full_layer_type), intent(in) :: this !! Instance of the fully connected layer integer :: num_params !! Number of parameters num_params = ( this%num_inputs + 1 )* this%num_outputs end function get_num_params_full