get_num_params_fixed_lno Function

private pure function get_num_params_fixed_lno(this) result(num_params)

Return the number of learnable parameters for the layer

Type Bound

fixed_lno_layer_type

Arguments

Type IntentOptional Attributes Name
class(fixed_lno_layer_type), intent(in) :: this

Layer instance

Return Value integer

Total number of learnable parameters


Source Code

  pure function get_num_params_fixed_lno(this) result(num_params)
    !! Return the number of learnable parameters for the layer
    implicit none

    ! Arguments
    class(fixed_lno_layer_type), intent(in) :: this
    !! Layer instance
    integer :: num_params
    !! Total number of learnable parameters

    ! R: num_modes^2, W: n_out * n_in, b: n_out (optional)
    num_params = this%num_modes * this%num_modes + &
         this%num_outputs * this%num_inputs
    if(this%use_bias) num_params = num_params + this%num_outputs

  end function get_num_params_fixed_lno