Get the number of parameters for the message passing layer
This function calculates the number of parameters for the message passing layer. This procedure is based on code from the neural-fortran library
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(kipf_msgpass_layer_type), | intent(in) | :: | this |
Instance of the message passing layer |
Number of parameters
pure function get_num_params_kipf(this) result(num_params) !! Get the number of parameters for the message passing layer !! !! This function calculates the number of parameters for the message passing !! layer. !! This procedure is based on code from the neural-fortran library implicit none ! Arguments class(kipf_msgpass_layer_type), intent(in) :: this !! Instance of the message passing layer integer :: num_params !! Number of parameters ! Local variables integer :: t !! Loop index num_params = 0 do t = 1, this%num_time_steps num_params = num_params + & this%num_vertex_features(t-1) * this%num_vertex_features(t) end do end function get_num_params_kipf