{"id":19290329,"url":"https://github.com/busraoguzoglu/mnist-vae","last_synced_at":"2025-06-16T03:36:45.288Z","repository":{"id":175366080,"uuid":"374356497","full_name":"busraoguzoglu/MNIST-VAE","owner":"busraoguzoglu","description":"VAE Implementation with LSTM Encoder and CNN Decoder","archived":false,"fork":false,"pushed_at":"2021-06-18T12:08:32.000Z","size":720,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T19:42:57.748Z","etag":null,"topics":["generator","lstm-cnn","mnist","mnist-model","vae"],"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/busraoguzoglu.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":"2021-06-06T12:37:03.000Z","updated_at":"2024-09-11T21:25:32.000Z","dependencies_parsed_at":"2023-07-03T05:19:35.900Z","dependency_job_id":null,"html_url":"https://github.com/busraoguzoglu/MNIST-VAE","commit_stats":null,"previous_names":["busraoguzoglu/mnist-vae"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FMNIST-VAE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FMNIST-VAE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FMNIST-VAE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busraoguzoglu%2FMNIST-VAE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busraoguzoglu","download_url":"https://codeload.github.com/busraoguzoglu/MNIST-VAE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240395741,"owners_count":19794573,"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":["generator","lstm-cnn","mnist","mnist-model","vae"],"created_at":"2024-11-09T22:18:51.629Z","updated_at":"2025-02-23T23:45:25.453Z","avatar_url":"https://github.com/busraoguzoglu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNIST-VAE\n\nImplementation of VAE, different versions are as follows:\n\nLinear: Encoder -\u003e Linear | Decoder -\u003e Linear (Ref: https://github.com/lyeoni/pytorch-mnist-VAE/blob/master/pytorch-mnist-VAE.ipynb)\n\nCNN: Encoder -\u003e CNN | Decoder -\u003e CNN (Ref: https://towardsdatascience.com/building-a-convolutional-vae-in-pytorch-a0f54c947f71)\n\nLSTM-CNN: Encoder -\u003e LSTM | Decoder -\u003e CNN (the main version, in the files main.py model.py and generator.py)\n\nImplemented for the third project of CMPE 597 Deep Learning Course of Bogazici University.\n\n-----------------------------------------------------------------------------------------------------------------\nmodel.py: \nThis file includes the VAE class, which includes the encoder and the decoder,\nthe sampling method and the forward function.\nTrain function is not included in this file.\nParameters regarding to network (number of layers and dimensions) can be changed\nfrom this file.\n\n-----------------------------------------------------------------------------------------------------------------\nmain.py: \nWhen this file is running:\nDatasets are loaded, they are downloaded if they do not exist in the file 'mnist_data'.\nNetwork is defined (from model.py)\nTraining function is called and training is done.\nTesting function is called and test is done after the training.\nWhen the training finishes, three curves are plotted:\nFirst curve shows the change in total loss.\nSecond curve shows the change in KLD.\nThird curve shows the change in BCE.\nAfter the training finishes, trained model is saved as model.pth file.\nTraining function is called in main function, number of epochs can be changed from there.\nCan be used with CUDA if available.\n\n-----------------------------------------------------------------------------------------------------------------\ngenerator.py: \nWhen this file is running:\nModel is loaded from the same directory, name of the file can be changed.\nRandomized vectors are created using torch.randn to feed the decoder.\nResults from the decoder are visualized in a grid.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusraoguzoglu%2Fmnist-vae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusraoguzoglu%2Fmnist-vae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusraoguzoglu%2Fmnist-vae/lists"}