get_num_params_batch Module Function

pure module function get_num_params_batch(this) result(num_params)

Get the number of parameters in batch normalisation layer

Arguments

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

Instance of the layer

Return Value integer

Number of parameters


Source Code

  pure module function get_num_params_batch(this) result(num_params)
    !! Get the number of parameters in batch normalisation layer
    implicit none

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

    ! num_filters x num_channels x kernel_size + num_biases
    ! num_biases = num_filters
    num_params = 2 * this%num_channels

  end function get_num_params_batch