{"id":18892976,"url":"https://github.com/dongjunlee/vae-tensorflow","last_synced_at":"2026-03-17T18:36:13.413Z","repository":{"id":236588809,"uuid":"119528982","full_name":"DongjunLee/vae-tensorflow","owner":"DongjunLee","description":"TensorFlow implementation of Auto-Encoding Variational Bayes.","archived":false,"fork":false,"pushed_at":"2018-02-03T09:30:03.000Z","size":695,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T00:13:40.189Z","etag":null,"topics":["generative-model","hb-experiment","mnist","tensorflow","variational-autoencoders","variational-inference"],"latest_commit_sha":null,"homepage":"","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/DongjunLee.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-30T11:51:56.000Z","updated_at":"2022-01-09T11:08:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec726f5f-f878-4c82-80ab-2c3c6ae133bf","html_url":"https://github.com/DongjunLee/vae-tensorflow","commit_stats":null,"previous_names":["dongjunlee/vae-tensorflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DongjunLee/vae-tensorflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongjunLee%2Fvae-tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongjunLee%2Fvae-tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongjunLee%2Fvae-tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongjunLee%2Fvae-tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DongjunLee","download_url":"https://codeload.github.com/DongjunLee/vae-tensorflow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DongjunLee%2Fvae-tensorflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30628418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["generative-model","hb-experiment","mnist","tensorflow","variational-autoencoders","variational-inference"],"created_at":"2024-11-08T08:06:54.363Z","updated_at":"2026-03-17T18:36:13.398Z","avatar_url":"https://github.com/DongjunLee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Variational Autoencoder [![hb-research](https://img.shields.io/badge/hb--research-experiment-green.svg?style=flat\u0026colorA=448C57\u0026colorB=555555)](https://github.com/hb-research)\n\nTensorFlow implementation of [Auto-Encoding Variational Bayes](https://arxiv.org/abs/1312.6114).\n\n![images](images/vae_4.png)\n\n## Requirements\n\n- Python 3.6\n- TensorFlow \u003e= 1.4\n- [hb-config](https://github.com/hb-research/hb-config) (Singleton Config)\n- requests\n- [Slack Incoming Webhook URL](https://my.slack.com/services/new/incoming-webhook/)\n- Matplotlib\n\n\n## Project Structure\n\ninit Project by [hb-base](https://github.com/hb-research/hb-base)\n\n    .\n    ├── config                  # Config files (.yml, .json) using with hb-config\n    ├── data                    # dataset path\n    ├── variational_autoencoder     # VAE architecture graphs (from input to logits)\n        └── __init__.py             # Graph logic\n    ├── data_loader.py          # download data -\u003e generate_batch (using Dataset)\n    ├── main.py                 # define experiment_fn\n    └── model.py                # define EstimatorSpec\n\nReference : [hb-config](https://github.com/hb-research/hb-config), [Dataset](https://www.tensorflow.org/api_docs/python/tf/data/Dataset#from_generator), [experiments_fn](https://www.tensorflow.org/api_docs/python/tf/contrib/learn/Experiment), [EstimatorSpec](https://www.tensorflow.org/api_docs/python/tf/estimator/EstimatorSpec)\n\n## Config\n\nCan control all **Experimental environment**.\n\nexample: mnist.yml\n\n```yml\nmodel:\n  batch_size: 32\n  z_dim: 20\n  n_output: 784\n\n  encoder_h1: 512\n  encoder_h2: 256\n  encoder_h3: 128\n\n  decoder_h1: 128\n  decoder_h2: 256\n  decoder_h3: 512\n\ntrain:\n  learning_rate: 0.00001\n  optimizer: 'Adam'                # Adagrad, Adam, Ftrl, Momentum, RMSProp, SGD\n\n  train_steps: 200000\n  model_dir: 'logs/mnist'\n\n  save_checkpoints_steps: 1000\n  check_hook_n_iter: 1000\n  min_eval_frequency: 10\n\n  print_verbose: True\n  debug: False\n\nslack:\n  webhook_url: \"\"                   # after training notify you using slack-webhook\n```\n\n* debug mode : using [tfdbg](https://www.tensorflow.org/programmers_guide/debugger)\n\n\n## Usage\n\nInstall requirements.\n\n```pip install -r requirements.txt```\n\nThen, start training model\n\n```\npython main.py --config mnist\n```\n\nAfter training, generate image from latent vector.\n\n```\npython generate.py --config mnist --batch_size 100\n```\n\n\n### Experiments modes\n\n:white_check_mark: : Working  \n:white_medium_small_square: : Not tested yet.\n\n- :white_check_mark: `evaluate` : Evaluate on the evaluation data.\n- :white_medium_small_square: `extend_train_hooks` :  Extends the hooks for training.\n- :white_medium_small_square: `reset_export_strategies` : Resets the export strategies with the new_export_strategies.\n- :white_medium_small_square: `run_std_server` : Starts a TensorFlow server and joins the serving thread.\n- :white_medium_small_square: `test` : Tests training, evaluating and exporting the estimator for a single step.\n- :white_check_mark: `train` : Fit the estimator using the training data.\n- :white_check_mark: `train_and_evaluate` : Interleaves training and evaluation.\n\n---\n\n\n### Tensorboar\n\n```tensorboard --logdir logs```\n\n![images](images/vae-tensorboard.png)\n\n## Result\n\n- Generate Mnist image (Config: `mnist.yml`)\n\n![images](images/vae-results.png)\n\n## Reference\n- [hb-research/notes - Auto-Encoding Variational Bayes](https://github.com/hb-research/notes/blob/master/notes/vae.md)\n- [Paper - Auto-Encoding Variational Bayes](https://arxiv.org/abs/1609.05473)\n- [shaohua0116/VAE-Tensorflow ](https://github.com/shaohua0116/VAE-Tensorflow)\n\n## Author\n\n[Dongjun Lee](https://github.com/DongjunLee) (humanbrain.djlee@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdongjunlee%2Fvae-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdongjunlee%2Fvae-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdongjunlee%2Fvae-tensorflow/lists"}