{"id":21054436,"url":"https://github.com/junqiangwu/nas","last_synced_at":"2025-05-15T22:34:09.834Z","repository":{"id":201877726,"uuid":"166009202","full_name":"junqiangwu/NAS","owner":"junqiangwu","description":"Neural architecture search(NAS)","archived":false,"fork":false,"pushed_at":"2019-01-21T08:18:47.000Z","size":117,"stargazers_count":10,"open_issues_count":0,"forks_count":35,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T16:12:53.374Z","etag":null,"topics":["fbnet","mxnet","nas"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"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/junqiangwu.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}},"created_at":"2019-01-16T09:09:28.000Z","updated_at":"2024-11-05T08:32:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"793317be-2c19-4d9a-8f1a-685f20078891","html_url":"https://github.com/junqiangwu/NAS","commit_stats":null,"previous_names":["junqiangwu/nas"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junqiangwu%2FNAS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junqiangwu%2FNAS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junqiangwu%2FNAS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junqiangwu%2FNAS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junqiangwu","download_url":"https://codeload.github.com/junqiangwu/NAS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254433521,"owners_count":22070486,"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":["fbnet","mxnet","nas"],"created_at":"2024-11-19T16:14:00.653Z","updated_at":"2025-05-15T22:34:07.829Z","avatar_url":"https://github.com/junqiangwu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAS(Neural Architecture Search)\n\n## FBNet \n- Hardware-Aware Efficient ConvNet Design via Differentiable Neural Architecture Search\n**Implementation of FBNet with MXNet**\n\npaper address: https://arxiv.org/pdf/1812.03443.pdf\n\n### Implemented Net:\n\n- FBNet\n- FBNet Based on Se_Resnet_50_Architecture\n\nother block_type architecture cound be easily implement by modify fbnet-symbol/block.py\n\n**Code:**\n* `blocks.py`: Define blocks symbols\n* `FBNet.py`: Define FBNet Class.\n* `FBNet_SE.py`: Define FBNet Architecture  based on Se_resnet_50.\n* `blocks_se.py`: Define blocks symbols based on new search space,include [Resnet_50,Se,Group_Conv,Channel_shuffle,Deform_Conv]\n* `util.py`: Define some functions.\n* `test.py`: Run test.\n* `block_speed_test.py`: test block lat in real environment(1080Ti)\n\n\n**Differences from original paper**: \n  * The last conv layer's num_filters is repalced by feature_dim specified by paramters\n  * Use *Amsoftmax*, *Arcface* instead of *FC*, but you can set model_type to `softamx` to use fc\n  * Default input shape is `3,108,108`, so the first conv layer has stride 1 instead of 2.\n  * Add `BN` out of blocks, and **no** `bn` inside blocks.\n  * Last conv has kernel size `3,3`\n  * Use **+** in loss not **\\***.\n  * Adding gradient rising stage in cosine decaying schedule. Code in fbnet-symbom/util/CosineDecayScheduler_Grad\n  \n\n#### How to train:\n\nIf you want to modify the network structure or the learning rate adjustment function, you need to modify the source code, \notherwise you can use this command directly:\n\n```shell\npython test.py --gpu 0,1,2,3,4,5,6  --log-frequence 50 --model-type softmax --batch-size 32 \n```\n\n#### How to retrain:\n\nWhen we want to train the large dataset and hope to change learning rate manually, or the machine is suddenly shutdown due to some reason,\nof course, we definitely hope we can continue to train model with previous trained weights. Then, your can use this cmd:\n\n```shell\npython test.py --gpu 0,1,2,3,4,5,6  --log-frequence 50 --model-type softmax --batch-size 32 --load-model-path ./model\n```\nThis can load the latest model params for retrain,If you want to load the model with specific epoch,\nyou can use ** --load-model-path ./model/*.params **,This means you can retrain your model from specific model.\n\n\n*TODO*:\n  - sample script, for now just save $\\theta$\n  - ~~cosine decaying schedule~~\n  - ~~lat in real environment~~\n  - ~~DataParallel implementation~~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunqiangwu%2Fnas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunqiangwu%2Fnas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunqiangwu%2Fnas/lists"}