mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-30 02:53:41 +08:00
.. | ||
bijectors.py | ||
distributions.py | ||
flows.py | ||
main.py | ||
README.md | ||
samples.png |
Normalizing flow
Real NVP normalizing flow from Dinh et al. (2016) implemented using mlx
.
The example is written in a somewhat more object-oriented style than strictly necessary, with an eye towards extension to other use cases benefitting from arbitrary distributions and bijectors.
Usage
The example can be run with
python main.py
which trains the normalizing flow on the two moons dataset and plots the result in samples.png
.
By default the example runs on the GPU. To run on the CPU, do
python main.py --cpu
For all available options, run
python main.py --help