{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/gan-slimming-all-in-one-gan-compression-by-a","title":"GAN Slimming: All-in-One GAN Compression by A Unified Optimization Framework","arxiv_id":"2008.11062","date":"2020-08-25","proceeding":"ECCV 2020 8","authors":["Haotao Wang","Shupeng Gui","Haichuan Yang","Ji Liu","Zhangyang Wang"],"abstract":"Generative adversarial networks (GANs) have gained increasing popularity in various computer vision applications, and recently start to be deployed to resource-constrained mobile devices. Similar to other deep models, state-of-the-art GANs suffer from high parameter complexities. That has recently motivated the exploration of compressing GANs (usually generators). Compared to the vast literature and prevailing success in compressing deep classifiers, the study of GAN compression remains in its infancy, so far leveraging individual compression techniques instead of more sophisticated combinations. We observe that due to the notorious instability of training GANs, heuristically stacking different compression techniques will result in unsatisfactory results. To this end, we propose the first unified optimization framework combining multiple compression means for GAN compression, dubbed GAN Slimming (GS). GS seamlessly integrates three mainstream compression techniques: model distillation, channel pruning and quantization, together with the GAN minimax objective, into one unified optimization form, that can be efficiently optimized from end to end. Without bells and whistles, GS largely outperforms existing options in compressing image-to-image translation GANs. Specifically, we apply GS to compress CartoonGAN, a state-of-the-art style transfer network, by up to 47 times, with minimal visual quality degradation. Codes and pre-trained models can be found at https://github.com/TAMU-VITA/GAN-Slimming.","url_abs":"https://arxiv.org/abs/2008.11062v1","url_pdf":"https://arxiv.org/pdf/2008.11062v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"gan-slimming-all-in-one-gan-compression-by-a","repo_url":"https://github.com/TAMU-VITA/GAN-Slimming","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"gan-slimming-all-in-one-gan-compression-by-a","repo_url":"https://github.com/TAMU-VITA/AGD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"image-to-image-translation","task_name":"Image-to-Image Translation"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2008.11062","atlas_url":"https://app.syntology.ai/?focus=2008.11062","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2008.11062"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TAMU-VITA/AGD","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TAMU-VITA/GAN-Slimming","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran_fixture":1,"unverified":9},"by_repo_kind":{"official":{"samples":8,"ran":1,"repositories":1},"listed":{"samples":5,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"430c582cd8bbb1df","entry":"gram_matrix","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/perceptual.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/perceptual.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"430c582cd8bbb1df"}},{"code_sha256_prefix":"0d41bbe52278fde1","entry":"gumbel_softmax_sample","repo":"TAMU-VITA/AGD","repo_kind":"listed","path":"AGD_SR/search/model_eval.py","file_url":"https://github.com/TAMU-VITA/AGD/blob/HEAD/AGD_SR/search/model_eval.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d41bbe52278fde1"}},{"code_sha256_prefix":"c04a23de0531da4a","entry":"make_layer","repo":"TAMU-VITA/AGD","repo_kind":"listed","path":"AGD_SR/search/RRDBNet_arch.py","file_url":"https://github.com/TAMU-VITA/AGD/blob/HEAD/AGD_SR/search/RRDBNet_arch.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c04a23de0531da4a"}},{"code_sha256_prefix":"7c913c414af7196f","entry":"sample_gumbel","repo":"TAMU-VITA/AGD","repo_kind":"listed","path":"AGD_SR/search/model_eval.py","file_url":"https://github.com/TAMU-VITA/AGD/blob/HEAD/AGD_SR/search/model_eval.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c913c414af7196f"}},{"code_sha256_prefix":"6855707db474b0fe","entry":"calculate_activation_statistics","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/fid_score.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/fid_score.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6855707db474b0fe"}},{"code_sha256_prefix":"0def50a351111624","entry":"calculate_frechet_distance","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/fid_score.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/fid_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0def50a351111624"}},{"code_sha256_prefix":"a15c72fa852b3ce1","entry":"get_activations","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/fid_score.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/fid_score.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a15c72fa852b3ce1"}},{"code_sha256_prefix":"d7fcc574ceb67943","entry":"gumbel_softmax","repo":"TAMU-VITA/AGD","repo_kind":"listed","path":"AGD_SR/search/model_search.py","file_url":"https://github.com/TAMU-VITA/AGD/blob/HEAD/AGD_SR/search/model_search.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d7fcc574ceb67943"}},{"code_sha256_prefix":"059345875fabd4d1","entry":"load_ckpt","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"059345875fabd4d1"}},{"code_sha256_prefix":"fae20b9ba8a551e6","entry":"load_ckpt_finetune","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fae20b9ba8a551e6"}},{"code_sha256_prefix":"bd00f8f9e13c8cf3","entry":"make_divisible","repo":"TAMU-VITA/AGD","repo_kind":"listed","path":"AGD_SR/search/model_eval.py","file_url":"https://github.com/TAMU-VITA/AGD/blob/HEAD/AGD_SR/search/model_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd00f8f9e13c8cf3"}},{"code_sha256_prefix":"6e7de6b67b97d840","entry":"perceptual_loss","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/perceptual.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/perceptual.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6e7de6b67b97d840"}},{"code_sha256_prefix":"0ee3f9ee92d8a8c6","entry":"tensor2image","repo":"TAMU-VITA/GAN-Slimming","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/TAMU-VITA/GAN-Slimming/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0ee3f9ee92d8a8c6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}