{"id":13478411,"url":"https://github.com/yixuan/temperflow","last_synced_at":"2025-04-09T18:41:25.077Z","repository":{"id":216994814,"uuid":"625119145","full_name":"yixuan/temperflow","owner":"yixuan","description":"Efficient Multimodal Sampling via Tempered Distribution Flow","archived":false,"fork":false,"pushed_at":"2023-04-11T06:57:24.000Z","size":3265,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T22:46:56.855Z","etag":null,"topics":["deep-learning","machine-learning","neural-networks","statistical-learning","statistical-sampling"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2304.03933","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/yixuan.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-08T05:57:16.000Z","updated_at":"2024-12-05T01:25:20.000Z","dependencies_parsed_at":"2024-01-14T02:56:00.319Z","dependency_job_id":"704a8810-3835-4a66-baf3-bddd3ebdad20","html_url":"https://github.com/yixuan/temperflow","commit_stats":null,"previous_names":["yixuan/temperflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixuan%2Ftemperflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixuan%2Ftemperflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixuan%2Ftemperflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixuan%2Ftemperflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yixuan","download_url":"https://codeload.github.com/yixuan/temperflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248089862,"owners_count":21045980,"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":["deep-learning","machine-learning","neural-networks","statistical-learning","statistical-sampling"],"created_at":"2024-07-31T16:01:56.620Z","updated_at":"2025-04-09T18:41:25.056Z","avatar_url":"https://github.com/yixuan.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## TemperFlow \u003cimg src=\"https://statr.me/images/sticker-temperflow.png\" alt=\"TemperFlow\" height=\"150px\" align=\"right\" /\u003e\n\nThis repository stores the code files for the article [Efficient Multimodal Sampling via Tempered Distribution Flow](https://arxiv.org/abs/2304.03933) by Yixuan Qiu and Xiao Wang.\n\n### Workflow\n\nWe provide two implementations of the TemperFlow algorithm,\none using the PyTorch framework (in the `torch` folder),\nand the other using the TensorFlow framework (in the `tf` folder).\n\nThe workflow to reproduce the results and plots in the article is as follows:\n\n1. Download the following two model files into the `tf/pretrained` folder.\n    - `face-gmmvae-generator.npz`: https://1drv.ms/u/s!ArsORq8a24WmoHtrued5dY6APVtH?e=noYKZr\n    - `face-gmmvae-flow.npz`: https://1drv.ms/u/s!ArsORq8a24WmoHwOx8nlOoXpXYEW?e=7aQ6ks\n\n2. Install the CUDA and cuDNN environments if you use GPU for computing. An installation guide can be found at https://www.tensorflow.org/install/pip.\n\n3. Install the PyTorch and TensorFlow frameworks, following the installation guides at https://pytorch.org/get-started/locally/ and https://www.tensorflow.org/install/pip.\n\n4. Run the main script as follows:\n    ```bash\n    sh run_experiments.sh\n    ```\n    This will call individual scripts under the `torch` and `tf` directories. When the script finishes, two new folders, both named `model`, will be created under the `torch` and `tf` directories, respectively. They will contain model data that are further used to create tables and plots.\n\n5. When Step 4 finishes, the two `model` folders would already contain image files for Figures 7, 9, 10, S2, S3, S4, and S11.\n\n6. The individual R scripts in the `visualization` directory provide the code to generate other figures and tables, based on the model data created in previous steps. For example, the script `fig1-figs1-kl-sampler.R` produces Figure 1 and S1, and `tabs1-benchmark.R` outputs the numbers in Table S1.\n\n### Software environment\n\nGPU computing:\n\n- CUDA 11.7\n- cuDNN 8.6.0\n\nPython:\n\n- Python 3.10.8\n- Numpy 1.23.5\n- SciPy 1.9.3\n- Pandas 1.5.2\n- POT 0.8.2\n- Matplotlib 3.6.2\n- Seaborn 0.12.1\n- PyTorch 1.13.1\n- Pyro 1.8.3\n- TensorFlow 2.10.0\n- TensorFlow Probability 0.18\n\nR:\n\n- R 4.2.0\n- reticulate 1.25\n- readr 2.1.2\n- jsonlite 1.8.0\n- tibble 3.1.8\n- reshape2 1.4.4\n- dplyr 1.0.9\n- ggplot2 3.3.6\n- GGally 2.1.2\n- gridExtra 2.3\n- rgl 0.108.3.2\n- showtext 0.9.5\n- transport 0.12.2\n- kernlab 0.9.31\n- nor1mix 1.3.0\n- copula 1.1.0\n\n### Citation\n\nPlease consider to cite our work if you find our algorithm or\nsoftware useful in your research.\n\n```\n@article{qiu2023efficient,\n  title={Efficient Multimodal Sampling via Tempered Distribution Flow},\n  author={Qiu, Yixuan and Wang, Xiao},\n  journal={Journal of the American Statistical Association},\n  number={just-accepted},\n  year={2023},\n  publisher={Taylor \\\u0026 Francis},\n  doi = {10.1080/01621459.2023.2198059}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyixuan%2Ftemperflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyixuan%2Ftemperflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyixuan%2Ftemperflow/lists"}