probabilists / zuko

Normalizing flows in PyTorch
https://zuko.readthedocs.io
MIT License
309 stars 23 forks source link

Add Glow-like multi-scale flow #6

Open francois-rozet opened 1 year ago

francois-rozet commented 1 year ago

Description

Glow is multi-scale normalizing flow based on affine coupling transforms introduced in Glow: Generative Flow with Invertible 1x1 Convolutions (Kingma et al., 2018).

Implementation

Due to its multi-scale nature, it is hard to translate the official implementation of Glow as a base distribution and a series of transformations. In particular, the shape and number of features change along the flow.

A first solution would be to define a MultiScaleNormalizingFlow distribution that would handle the removal of features in the log_prob method. Another solution would be to define a non-bijective transformation that would drop features in the forward direction and add random features in the inverse direction.