This repository is meant to reproduce the content of the article E. Bretin & R. Denis & S. Masnou & G. Terii, 2022, Learning phase field mean curvature flows with neural networks.
When the article goes out in 2022, we started to make a proper repo that should reproduce all figures of the article but we failed to exactly reproduce some of them due to the fact that we lost some experiment's exact configuration (and code version) among all experiments that we have done. This repository has been put aside when we had to move on to other projects.
The current content is thus incomplete and doesn't match exactly what is visible in the original article.
This repository relies on nnpf package that requires a Python version between 3.8 and 3.10 (versions above have not been tested).
You can use a currently installed Python or, for example, create a miniconda/anaconda environment:
conda env create -f environment.yml
conda activate nnpf_jcp2022If you need a specific computation platform context, like an older CUDA version or the support of ROCm, you should install PyTorch manually using the instructions available on the official website.
pip install nnpf==1.0.2This repository features already (partially) reproduced checkpoints and figures but you can compute them again if you want.
To compute all the content of the article (as far as reproduced in this repo), including the neural network checkpoints and the figure:
make clean
makeIf you want to use a GPU (for model training only), you can add the argument options="--gpus=1"
or even force everything (including the dataset) to be on the device with options="--force_gpu",
for example :
make -j2 options="--force_gpu"To only train the models:
make clean_models
make modelsIt takes about 2 hours on a (not heavily loaded) Nvidia V100s using the command-line:
make -j2 options="--force_gpu"To compute only the figures given already computed checkpoints:
make clean_figures
make figuresIt takes about 10 minutes on a CPU Intel(R) Xeon(R) E-2176.