From 2a073d588d720bd17dfd0334e654bb3ca91fc723 Mon Sep 17 00:00:00 2001 From: Damian Rouson Date: Tue, 31 Oct 2023 19:32:36 -0700 Subject: [PATCH] doc(README) add training configuration material --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 59909ea3f..d86aaeef1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Table of contents Overview -------- -Inference-Engine supports research in concurrent, large-batch inference and training of deep, feed-forward neural networks. Inference-Engine targets high-performance computing (HPC) applications with performance-critical inference and training needs. The initial target application is _in situ_ training of a cloud microphysics model proxy for the Intermediate Complexity Atmospheric Research ([ICAR]) model. Such a proxy must support concurrent inference at every grid point at every time step of an ICAR run. For validation purposes, Inference-Engine also supports the export and import of neural networks to and from Python by the companion package [nexport]. +Inference-Engine supports research in concurrent, large-batch inference and training of deep, feed-forward neural networks. Inference-Engine targets high-performance computing (HPC) applications with performance-critical inference and training needs. The initial target application is _in situ_ training of a cloud microphysics model proxy for the Intermediate Complexity Atmospheric Research ([ICAR]) model. Such a proxy must support concurrent inference at every grid point at every time step of an ICAR run. For validation purposes, Inference-Engine also supports the export and import of neural networks to and from Python by the companion package [nexport]. The features of Inference-Engine that make it suitable for use in HPC applications include @@ -44,6 +44,10 @@ The features of Inference-Engine that make it suitable for use in HPC applicatio Making Inference-Engine's `infer` functions and `train` subroutines `pure` facilitates invoking those procedures inside Fortran `do concurrent` constructs, which some compilers can offload automatically to graphics processing units (GPUs). The use of contiguous arrays facilitates spatial locality in memory access patterns. User control of mini-batch size facilitates in-situ training at application runtime. +The available optimizers for training neural networks are +1. Stochastic gradient descent +2. Adam (recommended) + Downloading, Building and Testing --------------------------------- To download, build, and test Inference-Engine, enter the following commands in a Linux, macOS, or Windows Subsystem for Linux shell: @@ -58,6 +62,28 @@ Examples -------- The [example](./example) subdirectory contains demonstrations of several intended use cases. +Configuring a Training Run +-------------------------- +To see the format for a [JSON] configuration file that defines the hyperparameters and a new network configuration for a training run, execute the provided training-configuration output example program: +``` +% ./build/run-fpm.sh run --example print-training-configuration +Project is up to date + { + "hyperparameters": { + "mini-batches" : 10, + "learning rate" : 1.50000000, + "optimizer" : "adam" + } + , + "network configuration": { + "skip connections" : false, + "nodes per layer" : [2,72,2], + "activation function" : "sigmoid" + } + } +``` +As of this writing, the JSON file format is fragile. Because an Intel `ifx` compiler bug prevents using our preferred JSON interface, [rojff], Inference-Engine currently use a very restricted but valid JSON subset that can be read and written by type-bound procedures on the `string_t` type in the [sourcery] utility. For this to work, it is important to keep input files as close as possible to the exact form shown above. In particular, do not split, combine or otherwise significantly rearrange lines in the above format other than adding or removing whitespace if so desired. + Documentation ------------- Please see the Inference-Engine GitHub Pages [site] for HTML documentation generated by [`ford`]. @@ -66,3 +92,6 @@ Please see the Inference-Engine GitHub Pages [site] for HTML documentation gener [`ford`]: https://github.com/Fortran-FOSS-Programmers/ford [nexport]: https://go.lbl.gov/nexport [ICAR]: https://github.com/NCAR/icar +[JSON]: https://www.json.org/json-en.html +[sourcery]: https://github.com/sourceryinstitute/sourcery +[rojff]: https://gitlab.com/everythingfunctional/rojff