这是对应 "Glow: Generative Flow with Invertible 1x1 Convolutions"论问的代码实现。

位置是
https://github.com/openai/glow

依赖:

Tensorflow (tested with v1.8.0)

Horovod (tested with v0.13.4) and (Open)MPI

依赖的数据集有;imagenet-oord ,lsun_realnvp,celeba,imagenet,lsun

下载的话,用如下脚本:

curl https://storage.googleapis.com/glow-demo/data/celeba-tfr.tar

tar -xvf celeb-tfr.tar

训练脚本:

mpiexec -n 8 python train.py

表示用8个GPU训练

例子如

mpiexec -n 8 python train.py --problem cifar10 --image_size 32 --n_level 3 --depth 32 --flow_permutation [0/1/2] --flow_coupling [0/1] --seed [0/1/2] --learntop --lr 0.001