{"id":20269006,"url":"https://github.com/1adrianb/expert-binary-networks","last_synced_at":"2025-04-11T03:51:15.647Z","repository":{"id":71161919,"uuid":"357848145","full_name":"1adrianb/expert-binary-networks","owner":"1adrianb","description":"Code for High-Capacity Expert Binary Networks (ICLR 2021).","archived":false,"fork":false,"pushed_at":"2021-12-03T00:25:23.000Z","size":25,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T01:51:10.965Z","etag":null,"topics":["binary-networks","conditional-computing","deep-learning","ondeviceai","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/1adrianb.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":"2021-04-14T09:27:42.000Z","updated_at":"2024-10-21T08:03:08.000Z","dependencies_parsed_at":"2023-02-22T01:00:30.754Z","dependency_job_id":null,"html_url":"https://github.com/1adrianb/expert-binary-networks","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/1adrianb%2Fexpert-binary-networks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1adrianb%2Fexpert-binary-networks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1adrianb%2Fexpert-binary-networks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1adrianb%2Fexpert-binary-networks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1adrianb","download_url":"https://codeload.github.com/1adrianb/expert-binary-networks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339262,"owners_count":21087214,"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":["binary-networks","conditional-computing","deep-learning","ondeviceai","pytorch"],"created_at":"2024-11-14T12:22:39.585Z","updated_at":"2025-04-11T03:51:15.641Z","avatar_url":"https://github.com/1adrianb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# High-Capacity Expert Binary Networks (ICLR 2021)\n\nThis code provides the core components for building networks based on the architectures and Expert Binary Convolutional Block introduced in the _High-Capacity Expert Binary Networks_ paper. You can find the full version of the paper [here](https://arxiv.org/pdf/2010.03558).\n\n## 1. Installation\n\nTo install and test the code simply clone the current repo, install the required packages listed bellow and prepare the training and/or testing(validation) data.\n\n### 1.1 Requirements\ntorch \u003e= 1.6.0\ntorchvision \u003e= 0.5.0\nbnn \u003e= 0.1.1\n\n### 1.2. Data preparation\n Download the ImageNet dataset from the official [webpage](http://image-net.org/download-images), creating a folder with the following structure: \n```\n│imagenet/\n├──train/\n│  ├── n01440764\n│  │   ├── n01440764_10026.JPEG\n│  │   ├── n01440764_10027.JPEG\n│  │   ├── ......\n│  ├── ......\n├──val/\n│  ├── n01440764\n│  │   ├── ILSVRC2012_val_00000293.JPEG\n│  │   ├── ILSVRC2012_val_00002138.JPEG\n│  │   ├── ......\n│  ├── ......\n```\nYou can construct this structure using for example the script found [here](https://gist.github.com/BIGBALLON/8a71d225eff18d88e469e6ea9b39cef4).\n\n## 2. Testing pretrained model\n\nA packed model, with the extra training components removed (i.e. the gate selection is performed using selection instead of multiplication as its the case for training etc) is available for download [here](https://www.adrianbulat.com/downloads/ICLR2021/model_binary_ebresnet.pth.tar).\n\n```\npython test/test.py imagenet_valid_location --path-to-model download_model_path\n```\n\n## Reference\n\nIf you find this repo useful, please consider citing:\n```\n@inproceedings{bulat2021high,\n  title={High-Capacity Expert Binary Networks},\n  author={Bulat, Adrian and Martinez, Brais and Tzimiropoulos, Georgios},\n  booktitle={International Conference on Learning Representations (ICLR)},\n  year={2021}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1adrianb%2Fexpert-binary-networks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1adrianb%2Fexpert-binary-networks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1adrianb%2Fexpert-binary-networks/lists"}