SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1505.05770 · 2015

Variational Inference with Normalizing Flows

Danilo Jimenez Rezende, Shakir Mohamed

arXiv · PDF · Open in the Atlas

Code that ran

21 of 37 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (13 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 18 have no contract verdict; 0 failures of our instrument; 16 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1505.05770.json · badge: /api/ran/1505.05770.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
clementchadebec/benchmark_VAE community
Papers with Code archive
6 ran · 1 no recorded run
ex4sperans/variational-inference-with-normalizing-flows community
Papers with Code archive
4 ran · 0 no recorded run
xqding/RealNVP community
Papers with Code archive
2 ran · 0 no recorded run
MaximeVandegar/Papers-in-100-Lines-of-Code community
Papers with Code archive
2 ran · 0 no recorded run
e-hulten/planar-flows community
Papers with Code archive
2 ran · 0 no recorded run
YeongHyeon/Normalizing-Flow-TF2 community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
Aditya-kiran/ResNet-VAE community (classifier label)
classifier basis not recorded on the link
1 ran · 13 no recorded run
PhilippeNguyen/keras_normalizing_flows community
Papers with Code archive
1 ran · 1 no recorded run
geetakrishna1994/planarflows community
Papers with Code archive
1 ran · 0 no recorded run
Daniil-Selikhanovych/h-vae community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
sigmoid Ran
ran, violated the contract we drafted
Aditya-kiran/ResNet-VAE/code/skewed_posterior_average_experiment.py
code served (permissive licence) · get_code("b8e95809ca2c17c9")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:39:00Z). If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The sigmoid function takes a single parameter 'x' which should be a numeric value or array
# Looking at the function body, it performs: 1 / (1 + np.exp(-x))
# This works with scalars, lists, or numpy arrays

# Create a small numpy array to pass as input
x_input = np.array([0.0, 1.0, -1.0, 2.0])

ARGS = {
    "x": x_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Affine_Coupling Ran
ran on a synthesized input · constructed an object; no result was computed
xqding/RealNVP/script/RealNVP_2D.py
pointer only (licence: NONE) · get_code("23d9a77b7ea93fff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, xqding/RealNVP when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

AutoConfig Ran
ran on a synthesized input · constructed an object; no result was computed
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("e0abb5bbdbdb0039")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, AutoConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import tempfile
from dataclasses import dataclass, field
from typing import Any, Dict, Tuple, Union

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a test JSON config file for BaseAEConfig
base_ae_config = {
    "name": "BaseAEConfig",
    "input_dim": (3, 32, 32),
    "latent_dim": 10,
    "uses_default_encoder": True,
    "uses_default_decoder": True
}

base_ae_json_path = os.path.join(temp_dir, "base_ae_config.json")
with open(base_ae_json_path, 'w') as f:
    json.dump(base_ae_config, f)

# Create a test JSON config file for AEConfig (alternative type)
ae_config = {
    "name": "AEConfig",
    "input_dim": (3, 32, 32),
    "latent_dim": 10,
    "uses_default_encoder": True,
    "uses_default_decoder": True
}

ae_json_path = os.path.join(temp_dir, "ae_config.json")
with open(ae_json_path, 'w') as f:
    json.dump(ae_config, f)

# Create a test JSON config file for BetaVAEConfig
beta_vae_config = {
    "name": "BetaVAEConfig",
    "input_dim": (3, 32, 32),
    "latent_dim": 10,
    "uses_default_encoder": True,
    "uses_default_decoder": True,
    "beta": 0.5
}

beta_vae_json_path = os.path.join(temp_dir, "beta_vae_config.json")
with open(beta_vae_json_path, 'w') as f:
    json.dump(beta_vae_config, f)

# The AutoConfig class only has class methods, so we need to define ARGS for calling from_json_file
# Since AutoConfig is primarily used via its class method from_json_file, 
# we'll provide the json_path argument that would be used

ARGS = {
    "json_path": base_ae_json_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AutoConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AutoConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseAEConfig Ran
ran on a synthesized input · constructed an object; no result was computed
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("abaa06aa769f9d3a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BaseAEConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import os
from typing import Tuple, Union

torch.manual_seed(0)

# Create a temporary directory for potential file operations
import tempfile
temp_dir = tempfile.mkdtemp()

ARGS = {
    'input_dim': (3, 32, 32),
    'latent_dim': 16,
    'uses_default_encoder': True,
    'uses_default_decoder': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BaseAEConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BaseAEConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseConfig Ran
ran on a synthesized input · constructed an object; no result was computed
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("b5fbd3b05aee0e24")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BaseConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import json
from dataclasses import dataclass, field
from typing import Any, Dict

@dataclass
class BaseConfig:
    """This is the BaseConfig class which defines all the useful loading and saving methods
    of the configs"""
    name: str = field(init=False)

    def __post_init__(self):
        self.name = self.__class__.__name__

    @classmethod
    def from_dict(cls, config_dict: Dict[str, Any]) -> 'BaseConfig':
        """Creates a :class:`~pythae.config.BaseConfig` instance from a dictionnary

        Args:
            config_dict (dict): The Python dictionnary containing all the parameters

        Returns:
            :class:`BaseConfig`: The created instance
        """
        try:
            config = cls(**config_dict)
        except (TypeError) as e:
            raise e
        return config

    @classmethod
    def _dict_from_json(cls, json_path: str) -> Dict[str, Any]:
        try:
            with open(json_path) as f:
                try:
                    config_dict = json.load(f)
                    return config_dict
                except (TypeError, json.JSONDecodeError) as e:
                    raise TypeError(f'File {json_path} not loadable. Maybe not json ? \nCatch Exception {type(e)} with message: ' + str(e)) from e
        except FileNotFoundError:
            raise FileNotFoundError(f"Config file not found. Please check path '{json_path}'")

    @classmethod
    def from_json_file(cls, json_path: str) -> 'BaseConfig':
        """Creates a :class:`~pythae.config.BaseConfig` instance from a JSON config file

        Args:
            json_path (str): The path to the json file containing all the parameters

        Returns:
            :class:`BaseConfig`: The created instance
        """
        import warnings
        config_dict = cls._dict_from_json(json_path)
        config_name = config_dict.pop('name')
        if cls.__name__ != config_name:
            warnings.warn(f'You are trying to load a `{cls.__name__}` while a `{config_name}` is given.')
        return cls.from_dict(config_dict)

    def to_dict(self) -> dict:
        """Transforms object into a Python dictionnary

        Returns:
            (dict): The dictionnary containing all the parameters"""
        from dataclasses import asdict
        return asdict(self)

    def to_json_string(self):
        """Transforms object into a JSON string

        Returns:
            (str): The JSON str containing all the parameters"""
        return json.dumps(self.to_dict())

    def save_json(self, dir_path, filename):
        """Saves a ``.json`` file from the dataclass

        Args:
            dir_path (str): path to the folder
            filename (str): the name of the file

        """
        with open(os.path.join(dir_path, f'{filename}.json'), 'w', encoding='utf-8') as fp:
            fp.write(self.to_json_string())


ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BaseConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BaseConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseNFConfig Ran
ran on a synthesized input · constructed an object; no result was computed
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("2279da7b087f8707")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BaseNFConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from dataclasses import dataclass, field
from typing import Tuple, Union, Any, Dict

torch.manual_seed(0)

ARGS = {
    "input_dim": (4, 3, 2)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BaseNFConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BaseNFConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
EnvironmentConfig Ran
ran on a synthesized input · constructed an object; no result was computed
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("d23c55d89b0211f5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EnvironmentConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
from dataclasses import dataclass, field
from typing import Any, Dict

@dataclass
class EnvironmentConfig:
    """Minimal EnvironmentConfig for testing"""
    python_version: str = '3.8'
    name: str = field(init=False)
    
    def __post_init__(self):
        self.name = self.__class__.__name__
    
    def to_dict(self):
        return {'python_version': self.python_version, 'name': self.name}
    
    def to_json_string(self):
        import json
        return json.dumps(self.to_dict())
    
    def save_json(self, dir_path, filename):
        os.makedirs(dir_path, exist_ok=True)
        with open(os.path.join(dir_path, f'{filename}.json'), 'w', encoding='utf-8') as fp:
            fp.write(self.to_json_string())
    
    @classmethod
    def from_dict(cls, config_dict: Dict[str, Any]) -> 'EnvironmentConfig':
        config_dict_copy = config_dict.copy()
        config_dict_copy.pop('name', None)
        return cls(**config_dict_copy)
    
    @classmethod
    def from_json_file(cls, json_path: str) -> 'EnvironmentConfig':
        import json
        with open(json_path) as f:
            config_dict = json.load(f)
        config_name = config_dict.pop('name', None)
        return cls.from_dict(config_dict)


ARGS = {
    'python_version': '3.9'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EnvironmentConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EnvironmentConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Flow Ran
ran on a synthesized input
PhilippeNguyen/keras_normalizing_flows/keras_normalizing_flows/layers/flows.py
pointer only (licence: NONE) · get_code("c8c71c93d51e985b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PhilippeNguyen/keras_normalizing_flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ModelOutput Ran
ran on a synthesized input · constructed an object; no result was computed
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("55fbb2b45d2ac35d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ModelOutput: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from collections import OrderedDict
from typing import Tuple, Any

torch.manual_seed(0)

class ModelOutput(OrderedDict):
    """Base ModelOutput class fixing the output type from the models. This class is inspired from
    the ``ModelOutput`` class from hugginface transformers library"""

    def __getitem__(self, k):
        if isinstance(k, str):
            self_dict = {k: v for k, v in self.items()}
            return self_dict[k]
        else:
            return self.to_tuple()[k]

    def __setattr__(self, name, value):
        super().__setitem__(name, value)
        super().__setattr__(name, value)

    def __setitem__(self, key, value):
        super().__setitem__(key, value)
        super().__setattr__(key, value)

    def to_tuple(self) -> Tuple[Any]:
        """
        Convert self to a tuple containing all the attributes/keys that are not ``None``.
        """
        return tuple((self[k] for k in self.keys()))


# ModelOutput is a class, not a function with parameters to pass
# The setup code should instantiate it with sample data
tensor_1 = torch.randn(2, 4)
tensor_2 = torch.randn(2, 3)
value_3 = 42

# Create an instance of ModelOutput with some test data
model_output = ModelOutput()
model_output['logits'] = tensor_1
model_output['hidden_states'] = tensor_2
model_output['loss'] = torch.tensor(value_3, dtype=torch.float32)

# Since ModelOutput itself doesn't have traditional function parameters,
# ARGS represents the initialization state of a ModelOutput instance
ARGS = {
    'initial_data': {
        'logits': tensor_1,
        'hidden_states': tensor_2,
        'loss': torch.tensor(value_3, dtype=torch.float32)
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModelOutput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ModelOutput output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
NormalizingFlow Ran
ran on a synthesized input · constructed an object; no result was computed
ex4sperans/variational-inference-with-normalizing-flows/flow.py
pointer only (licence: NONE) · get_code("316f9ba0ff91a5a2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ex4sperans/variational-inference-with-normalizing-flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

NormalizingFlow Ran
ran on a synthesized input · constructed an object; no result was computed
MaximeVandegar/Papers-in-100-Lines-of-Code/Variational_Inference_with_Normalizing_Flows/Flows.py
code served (permissive licence) · get_code("9773902c5cc03a74")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, NormalizingFlow: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Parameters for NormalizingFlow.__init__
flow_length = 2
data_dim = 4

ARGS = {
    "flow_length": flow_length,
    "data_dim": data_dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NormalizingFlow — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NormalizingFlow output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
PlanarFlow Ran
ran on a synthesized input
ex4sperans/variational-inference-with-normalizing-flows/flow.py
pointer only (licence: NONE) · get_code("440a98a671fdc1fa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ex4sperans/variational-inference-with-normalizing-flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PlanarFlow Ran
ran on a synthesized input · constructed an object; no result was computed
MaximeVandegar/Papers-in-100-Lines-of-Code/Variational_Inference_with_Normalizing_Flows/Flows.py
code served (permissive licence) · get_code("3310760b2fbf8661")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, PlanarFlow: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# PlanarFlow.__init__ takes data_dim as a parameter
data_dim = 4

ARGS = {
    "data_dim": data_dim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PlanarFlow — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PlanarFlow output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
PlanarFlow Ran
ran on a synthesized input · constructed an object; no result was computed
geetakrishna1994/planarflows/planarflow.py
pointer only (licence: NONE) · get_code("247a8b5a39027f85")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, geetakrishna1994/planarflows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PlanarFlow Ran
ran on a synthesized input
e-hulten/planar-flows/planar_flow.py
pointer only (licence: NONE) · get_code("d8ecc7e58b4a76a0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, e-hulten/planar-flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PlanarFlowLogDetJacobian Ran
ran on a synthesized input · constructed an object; no result was computed
ex4sperans/variational-inference-with-normalizing-flows/flow.py
pointer only (licence: NONE) · get_code("69710277b0cbdc50")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ex4sperans/variational-inference-with-normalizing-flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PlanarTransform Ran
ran on a synthesized input
e-hulten/planar-flows/planar_flow.py
pointer only (licence: NONE) · get_code("a4c59b44755262a5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, e-hulten/planar-flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

RealNVP_2D Ran
ran on a synthesized input · constructed an object; no result was computed
xqding/RealNVP/script/RealNVP_2D.py
pointer only (licence: NONE) · get_code("b1e10a13adaaf25d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, xqding/RealNVP when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

min_max_norm Ran
ran on a synthesized input
YeongHyeon/Normalizing-Flow-TF2/source/utils.py
code served (permissive licence) · get_code("bbf4ede63ece446f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor to use as input
# The function calls x.min(), x.max(), and performs arithmetic operations
# so x needs to be a torch.Tensor
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
safe_log Ran
ran, honoured the contract we drafted
ex4sperans/variational-inference-with-normalizing-flows/flow.py
pointer only (licence: NONE) · get_code("6298a45a525420e8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ex4sperans/variational-inference-with-normalizing-flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sorted_list Ran
ran, honoured the contract we drafted
YeongHyeon/Normalizing-Flow-TF2/source/utils.py
code served (permissive licence) · get_code("b18b30a58f75b472")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import glob
import tempfile
import shutil

# Create a temporary directory with some test files
tmpdir = tempfile.mkdtemp()
try:
    # Create some test files with names that will sort predictably
    test_files = [
        os.path.join(tmpdir, "file_03.txt"),
        os.path.join(tmpdir, "file_01.txt"),
        os.path.join(tmpdir, "file_02.txt"),
    ]
    for f in test_files:
        with open(f, 'w') as fp:
            fp.write("test")
    
    # Define the path pattern for glob
    path_pattern = os.path.join(tmpdir, "file_*.txt")
    
    ARGS = {
        "path": path_pattern,
    }
finally:
    # Clean up
    shutil.rmtree(tmpdir)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseNF Not yet run
unverified (harvested, no recorded run)
clementchadebec/benchmark_VAE/src/pythae/models/normalizing_flows/base/base_nf_model.py
code served (permissive licence) · get_code("91d3bbbb5efe3929")
How it ran

no invocation recorded.

NF Not yet run
unverified (harvested, no recorded run)
Daniil-Selikhanovych/h-vae/gaussians/api/models.py
pointer only (licence: NONE) · get_code("599becb3ed1056d1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Daniil-Selikhanovych/h-vae when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

PlanarFlow Not yet run
unverified (harvested, no recorded run)
PhilippeNguyen/keras_normalizing_flows/keras_normalizing_flows/layers/flows.py
pointer only (licence: NONE) · get_code("1c0a878b12170abd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PhilippeNguyen/keras_normalizing_flows when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

allreduce_mean Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/tf_utils.py
code served (permissive licence) · get_code("8844787656fd1163")
How it ran

no invocation recorded.

allreduce_sum Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/tf_utils.py
code served (permissive licence) · get_code("4611d711d59e5060")
How it ran

no invocation recorded.

cross_entropy_loss Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/losses.py
code served (permissive licence) · get_code("70fc47d8442de3fe")
How it ran

no invocation recorded.

default_initial_value Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/tf_utils.py
code served (permissive licence) · get_code("055d00949350c46f")
How it ran

no invocation recorded.

density_1 Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/distributions.py
code served (permissive licence) · get_code("1c2bc7d2b78d8ef5")
How it ran

no invocation recorded.

density_2 Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/distributions.py
code served (permissive licence) · get_code("195503ae7c35727b")
How it ran

no invocation recorded.

detJacHeatmap Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/utils.py
code served (permissive licence) · get_code("c5ec6731983d1241")
How it ran

no invocation recorded.

gaussian_log_pdf Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/losses.py
code served (permissive licence) · get_code("49f6fcb18f1f47cf")
How it ran

no invocation recorded.

kl_divergence_gaussian Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/losses.py
code served (permissive licence) · get_code("a89c520b4b008749")
How it ran

no invocation recorded.

logBetaBinomial Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/skewed_posterior_average_experiment.py
code served (permissive licence) · get_code("93056f98b395f678")
How it ran

no invocation recorded.

logModel Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/skewed_posterior_average_experiment.py
code served (permissive licence) · get_code("fa0a61ac8091c5ee")
How it ran

no invocation recorded.

sample_z_np Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/flow_vae_mnist.py
code served (permissive licence) · get_code("9271e9decbb44f75")
How it ran

no invocation recorded.

sample_z_tf Not yet run
unverified (harvested, no recorded run)
Aditya-kiran/ResNet-VAE/code/flow_vae_mnist.py
code served (permissive licence) · get_code("3cfa1a107ce9c4c8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 37 samples lifted from this paper's linked repositories, 37 carry a function identity and 0 do not. Of the 37 distinct functions with an identity, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 4 later) and 33 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
sigmoid 51 other papers
51 later · 2 only as an assembly brick
1804.00779 (2018-04)
Neural Autoregressive Flows
1809.10765 (2018-09)
Auto-Encoding Knockoff Generator for FDR Controlled Variable Selection
1811.00145 (2018-11)
Scalable End-to-End Autonomous Vehicle Testing via Rare-event Simulation
and 48 more not named here
min_max_norm 2 other papers
2 later
1902.02476 (2019-02)
A Simple Baseline for Bayesian Uncertainty in Deep Learning
2105.01601 (2021-05)
MLP-Mixer: An all-MLP Architecture for Vision
safe_log
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2002.11896 (2020-02)
Gradient Boosted Normalizing Flows
2004.12585 (2020-04)
A Batch Normalized Inference Network Keeps the KL Vanishing Away
sorted_list 2 other papers
2 later
1902.02476 (2019-02)
A Simple Baseline for Bayesian Uncertainty in Deep Learning
2105.01601 (2021-05)
MLP-Mixer: An all-MLP Architecture for Vision

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The choice of approximate posterior distribution is one of the core problems in variational inference. Most applications of variational inference employ simple families of posterior approximations in order to allow for efficient inference, focusing on mean-field or other simple structured approximations. This restriction has a significant impact on the quality of inferences made using variational methods. We introduce a new approach for specifying flexible, arbitrarily complex and scalable approximate posterior distributions. Our approximations are distributions constructed through a normalizing flow, whereby a simple initial density is transformed into a more complex one by applying a sequence of invertible transformations until a desired level of complexity is attained. We use this view of normalizing flows to develop categories of finite and infinitesimal flows and provide a unified view of approaches for constructing rich posterior approximations. We demonstrate that the theoretical advantages of having posteriors that better match the true posterior, combined with the scalability of amortized variational approaches, provides a clear improvement in performance and applicability of variational inference.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1505.05770")
get_code_for_paper("1505.05770")
have("1505.05770")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1505.05770.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1505.05770.svg)](https://syntology.ai/paper/1505.05770)

Connect an agent — have() is free.