Official PyTorch implementation of the paper Recurrent Machines for Likelihood-Free Inference, published at the NeurIPS 2018 Workshop on Meta-Learning. arxiv:1811.12932
- Clone the repository:
git clone [email protected]:artix41/ALFI-pytorch.git
cd ALFI-pytorch/
- Inside an Anaconda environment, install the requirements from the file
requirements.txt
:
conda install --file requirements.txt
The script run-experiments.py
starts one or several experiments described in the configuration file(s) given in input. Its general usage is run-experiments.py [-h] [-l] [-v {0,1,2,3}] configs_dir output_dir
. For instance, if you want to run the default experiment on the simplified particle physics simulator (called Weinberg), you can run:
run-experiments.py configs/weinberg.yaml outputs -v 3
Experiments are saved automatically every save_every
iterations (given in the configuration file). If you want to load a previously saved experiment, simply use the -l
loading option:
run-experiments.py configs/weinberg.yaml outputs -v 3 -l
To implement your own simulator you should write a class that inherits from the abstract class Simulator.py (details about method given in the code file). If possible you should implement your simulator in pytorch for computation efficience. However you can also use your own simulator by implementing the inherited class as a simple bridge between your simulator and the ALFI framework, just taking care of mapping your data from/to tensorial variables.
If you have any question, please contact Antoine Wehenkel ([email protected]) or Arthur Pesah ([email protected]).