Skip to content

Commit

Permalink
feat(exampl): add print-training-configuration.f90
Browse files Browse the repository at this point in the history
replaces print-sample-input-file.f90
  • Loading branch information
rouson committed Nov 1, 2023
1 parent 628de78 commit 8b71bae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 24 deletions.
24 changes: 0 additions & 24 deletions example/print-sample-input-file.f90

This file was deleted.

15 changes: 15 additions & 0 deletions example/print-training-configuration.f90
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

0 comments on commit 8b71bae

Please sign in to comment.