Skip to content

Commit

Permalink
feat(example): add print-sample-input-file.f90
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Oct 31, 2023
1 parent 829b967 commit e629617
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions example/print-sample-input-file.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
program print_sample_input_file
use inference_engine_m, only : hyperparameters_t, network_configuration_t
implicit none

associate(params => hyperparameters_t(mini_batches=10, learning_rate=1.5, optimizer = "adam"))
associate(net_conf=> network_configuration_t(skip_connections=.false., nodes_per_layer=[2,72,2], activation_function="sigmoid"))
associate(params_json => params%to_json(), net_json => net_conf%to_json())
print *,"{"
block
integer line
do line = 1, size(params_json)
print *, (params_json(line)%string())
end do
do line = 1, size(net_json)
print *, (net_json(line)%string())
end do
end block
print *,"}"
end associate
end associate
end associate


end program

0 comments on commit e629617

Please sign in to comment.