{"id":18487901,"url":"https://github.com/srama2512/vae","last_synced_at":"2025-05-13T22:17:19.581Z","repository":{"id":79687085,"uuid":"81007100","full_name":"srama2512/VAE","owner":"srama2512","description":"A simple variational autoencoder to generate images from MNIST. Implemented in TensorFlow. ","archived":false,"fork":false,"pushed_at":"2017-03-05T15:52:02.000Z","size":25935,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-25T14:43:04.584Z","etag":null,"topics":["autoencoder","generative","generative-model","image-generation","variational"],"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/srama2512.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":"2017-02-05T16:58:14.000Z","updated_at":"2023-02-16T00:04:07.000Z","dependencies_parsed_at":"2023-05-14T17:00:14.161Z","dependency_job_id":null,"html_url":"https://github.com/srama2512/VAE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srama2512%2FVAE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srama2512%2FVAE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srama2512%2FVAE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srama2512%2FVAE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srama2512","download_url":"https://codeload.github.com/srama2512/VAE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239203101,"owners_count":19599293,"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":["autoencoder","generative","generative-model","image-generation","variational"],"created_at":"2024-11-06T12:50:57.736Z","updated_at":"2025-02-16T22:20:52.980Z","avatar_url":"https://github.com/srama2512.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Variational Autoencoder\n\nThis is an implementation of a simple variational autoencoder which trains\non the MNIST dataset and generates similar images of digits. \n\n## Requirements:\n\n1. CUDA toolkit 7.5\n2. cuDNN v5\n3. TensorFlow (https://github.com/tensorflow/tensorflow/tree/r0.10)\n\tfrom r0.10 branch, select binary compatible with the above.\n\n## Instructions to run:\nRun `python trainScriptClass.py`. It will train a simple 2 layer VAE generator with 2 layer encoder for training. The parameters are defined below:\n\n1. `batch_size`: size of the training and testing batch (for batch size of 20, it nearly reached 11 GB on NVIDIA-Titan X Maxwell) \n2. `X_size`: size of the input (here it is the total number of pixels)\n3. `hidden_enc_1_size`: hidden layer 1 size in the encoder\n4. `hidden_enc_2_size`: hidden layer 2 size in the encoder\n5. `hidden_gen_1_size`: hidden layer 1 size in the generator\n6. `hidden_gen_2_size`: hidden layer 2 size in the generator\n7. `z_size`: size of the latent variable \n\nThe model trains with a default learning rate of 1e-4 using the adam optimizer.\n\nThe model is trained for 200000 iterations and 20 randomly generated samples and the checkpoint of the corresponding model are saved in `generated_class/' directory after every 50000 iterations.\n\n## References:\n\n1. This was implemented based on the Carl Doersch's tutorial available at: https://arxiv.org/abs/1606.05908\n2. Another useful reference for implementing VAEs is: https://jmetzen.github.io/2015-11-27/vae.html\n\n## Changelog:\n\nFeb 10, 2017\n\n* Added convolution + deconvolution based VAE\n* Batch size is again fixed at initialization, have to alter the technique.\n\n======================================\n\n* Added support for a Beta weighting term in the KL Divergence loss\n* Batch size is no longer fixed at initialization\n* Added functions to encode a given x and decode a given z, and also to\n  perform both these operations to generate an image \"like\" the given one.\n* beta_trainScriptClass_conditional.py adds visualization of latent\n  features","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrama2512%2Fvae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrama2512%2Fvae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrama2512%2Fvae/lists"}