{"id":13869802,"url":"https://github.com/tatsy/normalizing-flows-pytorch","last_synced_at":"2026-01-27T10:31:47.991Z","repository":{"id":49369191,"uuid":"321317230","full_name":"tatsy/normalizing-flows-pytorch","owner":"tatsy","description":"PyTorch implementations of normalizing flow and its variants.","archived":false,"fork":false,"pushed_at":"2021-05-14T07:58:11.000Z","size":7721,"stargazers_count":74,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-23T15:35:45.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tatsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-14T10:47:59.000Z","updated_at":"2024-09-28T08:22:09.000Z","dependencies_parsed_at":"2022-09-05T03:00:25.594Z","dependency_job_id":null,"html_url":"https://github.com/tatsy/normalizing-flows-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tatsy/normalizing-flows-pytorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsy%2Fnormalizing-flows-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsy%2Fnormalizing-flows-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsy%2Fnormalizing-flows-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsy%2Fnormalizing-flows-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tatsy","download_url":"https://codeload.github.com/tatsy/normalizing-flows-pytorch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsy%2Fnormalizing-flows-pytorch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265451451,"owners_count":23767768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T20:01:17.833Z","updated_at":"2026-01-27T10:31:47.950Z","avatar_url":"https://github.com/tatsy.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Normalizing Flows by PyTorch\n===\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/95bd163ba34a495789e073b94bd2da3d)](https://www.codacy.com/gh/tatsy/normalizing-flows-pytorch/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=tatsy/normalizing-flows-pytorch\u0026amp;utm_campaign=Badge_Grade)\n\n\u003e PyTorch implementations of the networks for normalizing flows.\n\nModels\n---\n\nCurrently, following networks are implemented.\n\n* Planar flow\n  * Rezende and Mohamed 2015, \"Variational Inference with Normalizing Flows,\" [[arXiv]](https://arxiv.org/abs/1505.05770)\n* RealNVP\n  * Dinh et al., 2016, \"Density Estimation using Real NVP,\" [[arXiv]](https://arxiv.org/abs/1605.08803)\n* Glow\n  * Kingma and Dhariwal 2018, \"Glow: Generative Flow with Invertible 1x1 Convolutions,\" [[arXiv]](https://arxiv.org/abs/1807.03039v2) [[code]](https://github.com/openai/glow)\n* Flow++\n  * Ho et al., 2019, \"Flow++: Improving Flow-Based Generative Models with Variational Dequantization and Architecture Design,\" [[arXiv]](https://arxiv.org/abs/1902.00275) [[code]](https://github.com/aravindsrinivas/flowpp)\n* MAF\n  * Papamakarios et al., 2017, “Masked Autoregressive Flow for Density Estimation,” [[arXiv]](https://arxiv.org/abs/1705.07057)\n* Residual Flow\n  * Behrmann et al., 2018, \"Residual Flows for Invertible Generative Modeling,\" [[arXiv]](https://arxiv.org/abs/1906.02735) [[code]](https://github.com/rtqichen/residual-flows)\n* FFJORD\n  * Grathwohl et al., 2018, \"FFJORD: Free-form Continuous Dynamics for Scalable Reversible Generative Models,\" [[arXiv]](https://arxiv.org/abs/1810.01367) [[code]](https://github.com/rtqichen/ffjord)\n\n**Note:**\nThis repository is for easier understanding of the above networks. Therefore, you should use official source cods if provided.\n\nSetup\n---\n\n### Anaconda\n\nBy Anaconda, you can easily setup the environment using `environment.yml`.\n\n```shell\n$ conda env create -f environment.yml\n```\n\n### Pip\n\nIf you use `pip` or other tools, see the dependencies in [`environment.yml`](./environment.yml)\n\nRun\n---\n\nThis repo uses `hydra` to manage hyper parameters in training and evaluation. See [`configs`](./configs) folder to check the parameters for each network.\n\n```shell\n$ python main.py \\\n    network=[planar, realnvp, glow, flow++, maf, resflow, ffjord]\\\n    run.distrib=[circles, moons, normals, swiss, s_curve, mnist, cifar10]\n```\n\n**Note:**\nCurrently, I tested the networks only for 2D density transformation. So, results for 3D densities (`swiss` and `s_curve`) and images (`mnist` and `cifar10`) could be what you expect.\n\nResults\n---\n\nSee [`results/README.md`](./results/README.md) for more results.\n\n### Real NVP\n\n| Target | Reproduced | Training |\n|:--------:|:------------:|:----:|\n| ![](./results/density/realnvp/y_data_020000.jpg) | ![](./results/density/realnvp/y_sample_020000.jpg) | ![](./results/density/realnvp/movie.gif) |\n\n\n\n\n\nCopyright\n---\n\nMIT License (c) 2020, Tatsuya Yatagawa\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsy%2Fnormalizing-flows-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftatsy%2Fnormalizing-flows-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsy%2Fnormalizing-flows-pytorch/lists"}