{"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/tune-mode-convbn-blocks-for-efficient","title":"Efficient ConvBN Blocks for Transfer Learning and Beyond","arxiv_id":"2305.11624","date":"2023-05-19","proceeding":null,"authors":["Kaichao You","Guo Qin","Anchang Bao","Meng Cao","Ping Huang","Jiulong Shan","Mingsheng Long"],"abstract":"Convolution-BatchNorm (ConvBN) blocks are integral components in various computer vision tasks and other domains. A ConvBN block can operate in three modes: Train, Eval, and Deploy. While the Train mode is indispensable for training models from scratch, the Eval mode is suitable for transfer learning and beyond, and the Deploy mode is designed for the deployment of models. This paper focuses on the trade-off between stability and efficiency in ConvBN blocks: Deploy mode is efficient but suffers from training instability; Eval mode is widely used in transfer learning but lacks efficiency. To solve the dilemma, we theoretically reveal the reason behind the diminished training stability observed in the Deploy mode. Subsequently, we propose a novel Tune mode to bridge the gap between Eval mode and Deploy mode. The proposed Tune mode is as stable as Eval mode for transfer learning, and its computational efficiency closely matches that of the Deploy mode. Through extensive experiments in object detection, classification, and adversarial example generation across $5$ datasets and $12$ model architectures, we demonstrate that the proposed Tune mode retains the performance while significantly reducing GPU memory footprint and training time, thereby contributing efficient ConvBN blocks for transfer learning and beyond. Our method has been integrated into both PyTorch (general machine learning framework) and MMCV/MMEngine (computer vision framework). Practitioners just need one line of code to enjoy our efficient ConvBN blocks thanks to PyTorch's builtin machine learning compilers.","url_abs":"https://arxiv.org/abs/2305.11624v2","url_pdf":"https://arxiv.org/pdf/2305.11624v2.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":"tune-mode-convbn-blocks-for-efficient","repo_url":"https://github.com/apple/ml-tune-mode-convbn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tune-mode-convbn-blocks-for-efficient","repo_url":"https://github.com/mindspore-ai/contrib/tree/master/application/Efficient%20ConvBN%20Blocks%20for%20Transfer%20Learning%20and%20Beyond","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.11624","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.11624"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/apple/ml-tune-mode-convbn","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mindspore-ai/contrib/tree/master/application/Efficient%20ConvBN%20Blocks%20for%20Transfer%20Learning%20and%20Beyond","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":3,"samples":[{"code_sha256_prefix":"ee77e6d8bf7e3c33","entry":"efficient_conv_bn_eval_control","repo":"apple/ml-tune-mode-convbn","repo_kind":"official","path":"tune_mode_convbn.py","file_url":"https://github.com/apple/ml-tune-mode-convbn/blob/HEAD/tune_mode_convbn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ee77e6d8bf7e3c33"}},{"code_sha256_prefix":"d170b0671132d208","entry":"efficient_conv_bn_eval_forward","repo":"apple/ml-tune-mode-convbn","repo_kind":"official","path":"tune_mode_convbn.py","file_url":"https://github.com/apple/ml-tune-mode-convbn/blob/HEAD/tune_mode_convbn.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"d170b0671132d208"}},{"code_sha256_prefix":"8ce1a97f278e552e","entry":"efficient_conv_bn_eval_forward","repo":"apple/ml-tune-mode-convbn","repo_kind":"official","path":"tune_mode_convbn.py","file_url":"https://github.com/apple/ml-tune-mode-convbn/blob/HEAD/tune_mode_convbn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8ce1a97f278e552e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}