glasflow is a Python library containing a collection of Normalizing flows using PyTorch. It builds upon nflows.
To install from github:
pip install git+https://github.com/igr-ml/glasflow.gitBy default the version of PyTroch will not necessarily match the drivers on your system, to install a different version with the correct CUDA support see the PyTorch homepage for instructions: https://pytorch.org/.
To define a RealNVP flow:
from glasflow.flows import RealNVP
# define RealNVP flow. Change hyperparameters as nessesary.
flow = RealNVP(
n_inputs=2,
n_transforms=5,
n_neurons=32,
batch_norm_between_transforms=True
)Please see glasflow/examples for a typical training regime example.
Pull requests are welcome. You can review the contribution guidelines here. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.