-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(exampl): add print-training-configuration.f90
replaces print-sample-input-file.f90
- Loading branch information
Showing
2 changed files
with
15 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
program print_training_configuration | ||
!! Demonstrate how to construct and print a training_configuration_t object | ||
use inference_engine_m, only : training_configuration_t, hyperparameters_t, network_configuration_t | ||
use sourcery_m, only : file_t | ||
implicit none | ||
|
||
associate(training_configuration => training_configuration_t( & | ||
hyperparameters_t(mini_batches=10, learning_rate=1.5, optimizer = "adam"), & | ||
network_configuration_t(skip_connections=.false., nodes_per_layer=[2,72,2], activation_function="sigmoid") & | ||
)) | ||
associate(json_file => file_t(training_configuration%to_json())) | ||
call json_file%write_lines() | ||
end associate | ||
end associate | ||
end program |