All models

freia_realnvp

An invertible flow of affine coupling layers with exact log-likelihood, sampling and latent inference.

Diffusion and generative · 297 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (26 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
Real NVP
Parameters
4.8M
Operations
297
Framework
PyTorch
Recurrent
No
Published
ICLR 2017
Cited by
2,066 (as of 23 October 2026)
Authors
Laurent Dinh, Jascha Sohl-Dickstein, Samy Bengio
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m5089
Graph hash
6e58730637059da29db103e89b91d4670462d05bf27911fc91b3c6e5cb5023ad
Skeleton hash
c13f0072d959e09af71a23cb228b5b6ea45736bdcf45900ea5583ce5f071c33e
Architecture hash
18c3486640011bba694f34cfaa1b8606c5cc784288e723b202558f9ad943d291
Diagram SHA-256
d79838e32988bbbfac3f192aa2de8944feaf585d9c1eeab787344fd6a1086f2a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model applies the coupling blocks to 3×32×32 image tensors, with convolutional networks computing the scale and shift.

About this model's family

Real NVP is a generative model built from invertible transformations, which gives it exact log-likelihood computation, exact sampling and exact inference of latent variables. The name stands for real-valued non-volume preserving transformations.

The building block is the affine coupling layer. In each one, part of the input vector passes through unchanged and the rest is updated by a function that is simple to invert but depends on the unchanged part in a complex way. Inverting the layer never requires inverting the scale and shift functions s and t, so they can be arbitrarily complex networks. Because each layer leaves some components unchanged, layers are composed in an alternating pattern, so that what one layer leaves unchanged the next one updates.

For images the paper partitions the input with spatial checkerboard patterns and channel-wise masking. It uses deep residual networks with batch normalization and weight normalization for s and t. Both models in this group are sequences of such coupling blocks built with FrEIA, a framework for constructing invertible neural networks from simple invertible building blocks. The paper reports that its bits per dimension, while not improving over the Pixel RNN baseline, is competitive with other generative methods.

Key idea. Real NVP introduces real-valued non-volume preserving transformations, invertible and learnable, giving exact log-likelihood computation, exact sampling and exact inference of latent variables.

  • real nvp
  • realnvp
  • rnvp
  • affine coupling layer
  • non-volume preserving
  • normalizing flow
  • density estimation
  • invertible neural network
  • coupling flow
  • freia

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{dinh2017densityestimationusingreal,
      title={Density estimation using Real NVP}, 
      author={Laurent Dinh and Jascha Sohl-Dickstein and Samy Bengio},
      year={2017},
      eprint={1605.08803},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1605.08803}, 
}