set_hyperparams_dropout Subroutine

private pure subroutine set_hyperparams_dropout(this, rate, num_masks)

Set hyperparameters for dropout layer

Type Bound

dropout_layer_type

Arguments

Type IntentOptional Attributes Name
class(dropout_layer_type), intent(inout) :: this

Instance of the dropout layer

real(kind=real32), intent(in) :: rate

Drop rate

integer, intent(in) :: num_masks

Number of unique masks


Source Code

  pure subroutine set_hyperparams_dropout(this, rate, num_masks)
    !! Set hyperparameters for dropout layer
    implicit none

    ! Arguments
    class(dropout_layer_type), intent(inout) :: this
    !! Instance of the dropout layer
    real(real32), intent(in) :: rate
    !! Drop rate
    integer, intent(in) :: num_masks
    !! Number of unique masks

    this%name = "dropout"
    this%type = "drop"
    this%input_rank = 1
    this%output_rank = 1

    this%num_masks = num_masks
    this%rate = rate

  end subroutine set_hyperparams_dropout