map2map/README.md

73 lines
1.5 KiB
Markdown
Raw Normal View History

2019-11-19 03:43:39 +01:00
# map2map
Neural network emulators to transform field/map data
2020-03-04 02:23:13 +01:00
2020-04-21 18:34:14 +02:00
* [Installation](#installation)
* [Usage](#usage)
* [Data](#data)
* [Data normalization](#data-normalization)
* [Model](#model)
* [Training](#training)
* [Files generated](#files-generated)
* [Tracking](#tracking)
2020-03-04 02:23:13 +01:00
## Installation
Install in editable mode
```bash
pip install -e .
```
## Usage
Take a look at the examples in `scripts/*.slurm`, and the command line options
in `map2map/args.py` or by `m2m.py -h`.
2020-04-21 18:34:14 +02:00
### Data
2020-03-04 02:23:13 +01:00
Structure your data to start with the channel axis and then the spatial
dimensions.
Put each sample in one file.
Specify the data path with glob patterns.
2020-04-21 18:34:14 +02:00
#### Data normalization
2020-03-04 02:23:13 +01:00
Input and target (output) data can be normalized by functions defined in
`map2map2/data/norms/`.
2020-04-21 18:34:14 +02:00
### Model
2020-03-04 02:23:13 +01:00
Find the models in `map2map/models/`.
Customize the existing models, or add new models there and edit the `__init__.py`.
### Training
#### Files generated
* `*.out`: job stdout and stderr
* `state_*.pth`: training state including the model parameters
* `checkpoint.pth`: symlink to the latest state
* `runs/`: directories of tensorboard logs
#### Tracking
Install tensorboard and launch it by
```bash
tensorboard --logdir PATH --samples_per_plugin images=IMAGES --port PORT
```
* Use `.` as `PATH` in the training directory, or use the path to some parent
directory for tensorboard to search recursively for multiple jobs.
* Show `IMAGES` images, or all of them by setting it to 0.
* Pick a free `PORT`. For remote jobs, do ssh port forwarding.