get_num_params_msgpass Module Function

pure module function get_num_params_msgpass(this) result(num_params)

Get the number of learnable parameters in the layer

Arguments

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

Instance of the layer type

Return Value integer

Number of learnable parameters


Source Code

  pure module function get_num_params_msgpass(this) result(num_params)
    !! Get the number of learnable parameters in the layer
    implicit none

    ! Arguments
    class(msgpass_layer_type), intent(in) :: this
    !! Instance of the layer type
    integer :: num_params
    !! Number of learnable parameters

    ! Local variables
    integer :: t
    !! Time step

    num_params = sum(this%num_params_msg) + this%num_params_readout
  end function get_num_params_msgpass