{"id":15432758,"url":"https://github.com/gugarosa/synthetic_rbms","last_synced_at":"2025-07-24T07:05:45.718Z","repository":{"id":89337782,"uuid":"252833649","full_name":"gugarosa/synthetic_rbms","owner":"gugarosa","description":"📄 Official implementation regarding the paper \"Fast Ensemble Learning Using Adversarially-Generated Restricted Boltzmann Machines\".","archived":false,"fork":false,"pushed_at":"2022-10-05T12:16:07.000Z","size":87,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T07:39:52.238Z","etag":null,"topics":["artificial","gan","implementation","paper","rbm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gugarosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-04-03T20:27:08.000Z","updated_at":"2022-10-05T12:16:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"7dc9c329-603a-4fbc-9729-ab2e7d879a27","html_url":"https://github.com/gugarosa/synthetic_rbms","commit_stats":{"total_commits":59,"total_committers":1,"mean_commits":59.0,"dds":0.0,"last_synced_commit":"3f56819fc6dc02093a8e43773b31c96768144411"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gugarosa/synthetic_rbms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugarosa%2Fsynthetic_rbms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugarosa%2Fsynthetic_rbms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugarosa%2Fsynthetic_rbms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugarosa%2Fsynthetic_rbms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gugarosa","download_url":"https://codeload.github.com/gugarosa/synthetic_rbms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugarosa%2Fsynthetic_rbms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266807080,"owners_count":23987425,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["artificial","gan","implementation","paper","rbm"],"created_at":"2024-10-01T18:28:30.830Z","updated_at":"2025-07-24T07:05:45.697Z","avatar_url":"https://github.com/gugarosa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast Ensemble Learning Using Adversarially-Generated Restricted Boltzmann Machines\n\n*This repository holds all the necessary code to run the very-same experiments described in the paper \"Fast Ensemble Learning Using Adversarially-Generated Restricted Boltzmann Machines\".*\n\n---\n\n## References\n\nIf you use our work to fulfill any of your needs, please cite us:\n\n```BibTex\n@misc{rosa2021fast,\n      title={Fast Ensemble Learning Using Adversarially-Generated Restricted Boltzmann Machines}, \n      author={Gustavo H. de Rosa and Mateus Roder and João P. Papa},\n      year={2021},\n      eprint={2101.01042},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n```\n\n---\n\n## Structure\n\n  * `libraries/`: Folder containing a customized version of the NALP library regarding this experiment;\n  * `models/`: Folder for saving the output models, such as `.pth` and `tensorflow` ones;\n  * `utils/`\n    * `stream.py`: Common loading and saving methods;\n  * `weights/`: Folder for saving the output weights, which will use `.npy` extensions.\n\n---\n\n## Package Guidelines\n\n### Installation\n\nInstall all the pre-needed requirements using:\n\n```Python\npip install -r requirements.txt\n```\n\n---\n\n## Usage\n\n### RBMs Pre-Training\n\nOur first script helps you in pre-training an RBM and saving its weights. With that in mind, just run the following script with the input arguments:\n\n```Python\npython rbm_training.py -h\n```\n\n*Note that it will output a helper file in order to assist in choosing the correct arguments for the script.*\n\n### GANs Pre-Training and Sampling\n\nAfter pre-training RBMs and saving their weights, we can now train a GAN with the saved weights as its input. Just run the following script and invoke its helper:\n\n```Python\npython gan_training_and_sampling.py -h\n```\n\nIf you wish to sample any additional weights, please use:\n\n```Python\npython gan_sampling.py -h\n```\n\n### Finding GAN's Best Sampled Weight Guided by RBM Reconstruction or Classification\n\nWith a pre-trained and sampled weights from the GAN in hands, it is now possible to reconstruct/classify these weights over a validation set and compare at what epoch the GAN could outperform the original RBM. Therefore, run the following script in order to fulfill that purpose:\n\n```Python\npython find_best_sampled_weight_rec.py -h\n```\n\nor\n\n```Python\npython find_best_sampled_weight_clf.py -h\n```\n\n*Note that the saved models use `.pth` or `tensorflow` extensions, while saved weights will use a `*.npy` file.*\n\n### Final Evaluation\n\nAfter finding the best GAN's sampled weight, it is now possible to perform a final reconstruction/classification over the testing set. To accomplish such a procedure, please use:\n\n```Python\npython rbm_reconstruction.py -h\n```\n\nor\n\n```Python\npython rbm_classification.py -h\n```\n\n### Bash Script\n\nInstead of invoking every script to conduct the experiments, it is also possible to use the provided shell scripts, as follows:\n\n```Bash\n./train_synthetic_rbms.sh\n```\n\n```Bash\n./validate_synthetic_rbms.sh\n```\n\n```Bash\n./test_synthetic_rbms.sh\n```\n\nSuch a script will conduct every step needed to accomplish the experimentation used throughout this paper. Furthermore, one can change any input argument that is defined in the script.\n\n---\n\n## Support\n\nWe know that we do our best, but it is inevitable to acknowledge that we make mistakes. If you ever need to report a bug, report a problem, talk to us, please do so! We will be available at our bests at this repository.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgugarosa%2Fsynthetic_rbms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgugarosa%2Fsynthetic_rbms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgugarosa%2Fsynthetic_rbms/lists"}