{"id":19425332,"url":"https://github.com/shaharazulay/adversarial-autoencoder-classifier","last_synced_at":"2025-04-24T16:31:33.221Z","repository":{"id":111755658,"uuid":"169840059","full_name":"shaharazulay/adversarial-autoencoder-classifier","owner":"shaharazulay","description":"PyTorch implementations of Non-parametric Unsupervised Classification with Adversarial Autoencoders","archived":false,"fork":false,"pushed_at":"2019-04-26T09:34:07.000Z","size":2224,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T07:51:18.661Z","etag":null,"topics":["autoencoders","deep","generative-adversarial-network","pytorch","unsuper"],"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/shaharazulay.png","metadata":{"files":{"readme":"docs/README.rst","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":"2019-02-09T06:46:34.000Z","updated_at":"2023-12-19T16:56:57.000Z","dependencies_parsed_at":"2023-04-12T05:04:14.607Z","dependency_job_id":null,"html_url":"https://github.com/shaharazulay/adversarial-autoencoder-classifier","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/shaharazulay%2Fadversarial-autoencoder-classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaharazulay%2Fadversarial-autoencoder-classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaharazulay%2Fadversarial-autoencoder-classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaharazulay%2Fadversarial-autoencoder-classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaharazulay","download_url":"https://codeload.github.com/shaharazulay/adversarial-autoencoder-classifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250663544,"owners_count":21467366,"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":["autoencoders","deep","generative-adversarial-network","pytorch","unsuper"],"created_at":"2024-11-10T13:47:11.531Z","updated_at":"2025-04-24T16:31:33.214Z","avatar_url":"https://github.com/shaharazulay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Non Parametric Classification with Advesarial AutoEncoders\n============\n**PyTorch implementation of Non-parametric Unsupervised Classification with Adversarial Autoencoders.**\n\nShahar Azulay\n\n|Python27|_ |Python35|_ |License|_ |PyTorch|_ \n\n|Documentation|_\n\n.. image:: _static/logo.png\n\n\n.. |PyTorch| image:: https://github.com/pytorch/pytorch/blob/master/docs/source/_static/img/pytorch-logo-flame.svg\n.. _PyTorch: https://pytorch.org/\n\n.. |License| image:: https://img.shields.io/badge/license-BSD--3--Clause-brightgreen.svg\n.. _License: https://github.com/shaharazulay/traceable-dict/blob/master/LICENSE\n    \n.. |Python27| image:: https://img.shields.io/badge/python-2.7-blue.svg\n.. _Python27:\n\n.. |Python35| image:: https://img.shields.io/badge/python-3.5-blue.svg\n.. _Python35:\n    \n.. |Documentation| image:: _static/readthedocs_logo.jpg\n.. _Documentation: https://adversarial-autoencoder-classif.readthedocs.io/en/latest/\n\n*[1] A.Makhzani,  J.Shlens, N.Jaitly, I.Goodfellow, B.Frey: Adversarial Autoencoders, 2016, arXiv:1511.05644v2*\n\n\n**Usage Examples:**\n\n  Install the module\n   \n        \u003e\u003e\u003e python setup.py install --user\n        \n  **Initialize the Datasets**\n        \n        \u003e\u003e\u003e init_datasets --dir-path \u003cpath-to-data-dir\u003e\n\n  **Train a new AAE in an Semi-Supervised setting**\n  \n        \u003e\u003e\u003e train_semi_supervised --dir-path \u003cpath-to-data-dir\u003e --n-epochs 35 --z-size 2 --n-classes 10 --batch-size 100\n        loading data started...\n        dataset size in use: 3000 [labeled trainset]  47000 [un-labeled trainset]  10000 [validation]\n        using configuration:\n         {'learning_rates': {'auto_encoder_lr': 0.0008, 'generator_lr': 0.002, 'discriminator_lr': 0.0002, 'info_lr': 1e-05,             'mode_lr': 0.0008, 'disentanglement_lr': 0}, 'model': {'hidden_size': 3000, 'encoder_dropout': 0.2}, 'training':               {'use_mutual_info': False, 'use_mode_decoder': False, 'use_disentanglement': True, 'use_adam_optimization': True,            'use_adversarial_categorial_weights': True, 'lambda_z_l2_regularization': 0.15}}\n        current epoch:: [ ===================  ] 99.79%\n        ...\n  \n  .. image:: _static/unsupervised_advesarial_learning_curve.png\n  \n  **Train a new AAE in a Fully Unsupervised setting**\n\n        \u003e\u003e\u003e train_unsupervised --dir-path \u003cpath-to-data-dir\u003e --n-epochs 35 --z-size 2 --n-classes 10 --batch-size 100\n        loading data started...\n        dataset size in use: 3000 [labeled trainset]  47000 [un-labeled trainset]  10000 [validation]\n        ...\n        \n  **Visualize a trained model using pre-defined visualizations**\n\n        \u003e\u003e\u003e generate_model_visualization --dir-path \u003cpath-to-data-dir\u003e --model-dir-path {\u003cpath-to-model-dir\u003e --mode unsupervised --n-classes 10 --z-size 5\n        loading data started...\n        dataset size in use: 3000 [labeled trainset]  47000 [un-labeled trainset]  10000 [validation]\n        Label 1: 40.2%, Best matching label; 20\n        Label 2: 41.9%, Best matching label; 14\n        Label 3: 33.0%, Best matching label; 4\n        Label 4: 41.1%, Best matching label; 2\n        Label 5: 53.8%, Best matching label; 11\n        Label 6: 44.3%, Best matching label; 26\n        Label 7: 48.6%, Best matching label; 6\n        Label 8: 47.6%, Best matching label; 0\n        Label 9: 40.1%, Best matching label; 22\n        ACCURACY: 0.85%\n        ...\n\n  .. image:: _static/modes_and_samples_from_each_label.png\n  \n  Control the model and training hyper-parameters using a YAML configuration file\n        \u003e\u003e\u003e train_unsupervised --dir-path \u003cpath-to-data-dir\u003e --config-path \u003cpath-to-configuration-file\u003e --n-epochs 35 --z-size 2 --n-classes 10 --batch-size 100\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaharazulay%2Fadversarial-autoencoder-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaharazulay%2Fadversarial-autoencoder-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaharazulay%2Fadversarial-autoencoder-classifier/lists"}