post_epoch_hook Module Subroutine

module subroutine post_epoch_hook(this, epoch, loss, accuracy)

Default epoch hook — no-op. Override in a derived type to add custom per-epoch behaviour.

Arguments

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

Instance of network

integer, intent(in) :: epoch

Current epoch number

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

Mean loss over the epoch

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

Mean accuracy over the epoch


Source Code

  module subroutine post_epoch_hook(this, epoch, loss, accuracy)
    !! Default epoch hook — no-op.
    !! Override in a derived type to add custom per-epoch behaviour.
    implicit none

    ! Arguments
    class(network_type), intent(inout) :: this
    !! Instance of network
    integer, intent(in) :: epoch
    !! Current epoch number
    real(real32), intent(in) :: loss
    !! Mean loss over the epoch
    real(real32), intent(in) :: accuracy
    !! Mean accuracy over the epoch

  end subroutine post_epoch_hook