All models

freia_sequenceinn_rnvpcouplingblock

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 (25 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
3.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
m5094
Graph hash
f45bcd7d86050f64513dcec2b85d07d5e54ae7206997770e14eb155af73111b2
Skeleton hash
81810f3b140a8b490a5c3e726753181c4dabbd696982f43f82ee06f113eafd85
Architecture hash
2a79b604d62b494e0b0bf1d7777e9a47e967e45ba6322981989b5bd645213e6c
Diagram SHA-256
222698acb1c8650f394a88b7dacaeb6046d1e398177fc0602c2bdd58d6e414b8
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 flattened 784-dimensional vectors, with fully connected 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}, 
}