Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(README) add training configuration material #95

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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`].
Expand All @@ -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