Called automatically at the end of each training epoch. Logs "loss" and "accuracy" to the current W&B run.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(wandb_network_type), | intent(inout) | :: | this |
Network instance |
||
| integer, | intent(in) | :: | epoch |
Current epoch number (1-based) |
||
| real(kind=real32), | intent(in) | :: | loss |
Mean loss over the epoch |
||
| real(kind=real32), | intent(in) | :: | accuracy |
Mean accuracy over the epoch |
subroutine wandb_post_epoch_hook(this, epoch, loss, accuracy) !! Called automatically at the end of each training epoch. !! Logs "loss" and "accuracy" to the current W&B run. implicit none ! Arguments class(wandb_network_type), intent(inout) :: this !! Network instance integer, intent(in) :: epoch !! Current epoch number (1-based) real(real32), intent(in) :: loss !! Mean loss over the epoch real(real32), intent(in) :: accuracy !! Mean accuracy over the epoch call wandb_log("loss", loss, step=epoch) call wandb_log("accuracy", accuracy, step=epoch) end subroutine wandb_post_epoch_hook