{"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/mix-match-training-convnets-with-mixed-image","title":"Mix & Match: training convnets with mixed image sizes for improved accuracy, speed and scale resiliency","arxiv_id":"1908.08986","date":"2019-08-12","proceeding":null,"authors":["Elad Hoffer","Berry Weinstein","Itay Hubara","Tal Ben-Nun","Torsten Hoefler","Daniel Soudry"],"abstract":"Convolutional neural networks (CNNs) are commonly trained using a fixed spatial image size predetermined for a given model. Although trained on images of aspecific size, it is well established that CNNs can be used to evaluate a wide range of image sizes at test time, by adjusting the size of intermediate feature maps. In this work, we describe and evaluate a novel mixed-size training regime that mixes several image sizes at training time. We demonstrate that models trained using our method are more resilient to image size changes and generalize well even on small images. This allows faster inference by using smaller images attest time. For instance, we receive a 76.43% top-1 accuracy using ResNet50 with an image size of 160, which matches the accuracy of the baseline model with 2x fewer computations. Furthermore, for a given image size used at test time, we show this method can be exploited either to accelerate training or the final test accuracy. For example, we are able to reach a 79.27% accuracy with a model evaluated at a 288 spatial size for a relative improvement of 14% over the baseline.","url_abs":"https://arxiv.org/abs/1908.08986v1","url_pdf":"https://arxiv.org/pdf/1908.08986v1.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":"mix-match-training-convnets-with-mixed-image","repo_url":"https://github.com/eladhoffer/convNet.pytorch","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mix-match-training-convnets-with-mixed-image","repo_url":"https://github.com/vaapopescu/gradient-pruning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1908.08986","atlas_url":"https://app.syntology.ai/?focus=1908.08986","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1908.08986"}},"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/eladhoffer/convNet.pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vaapopescu/gradient-pruning","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"ran_draft_wrong":3,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1},"listed":{"samples":6,"ran":4,"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":"aae5c2e3ee7cae18","entry":"cosine_anneal_lr","repo":"vaapopescu/gradient-pruning","repo_kind":"listed","path":"models/evolved.py","file_url":"https://github.com/vaapopescu/gradient-pruning/blob/HEAD/models/evolved.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aae5c2e3ee7cae18"}},{"code_sha256_prefix":"b1ba3f72f7fe5886","entry":"drop_connect","repo":"vaapopescu/gradient-pruning","repo_kind":"listed","path":"models/efficientnet.py","file_url":"https://github.com/vaapopescu/gradient-pruning/blob/HEAD/models/efficientnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b1ba3f72f7fe5886"}},{"code_sha256_prefix":"13fc12ad0c473874","entry":"linear_scale","repo":"eladhoffer/convNet.pytorch","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/eladhoffer/convNet.pytorch/blob/HEAD/models/resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"13fc12ad0c473874"}},{"code_sha256_prefix":"ff9f0d582b3531c7","entry":"mixsize_config","repo":"eladhoffer/convNet.pytorch","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/eladhoffer/convNet.pytorch/blob/HEAD/models/resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff9f0d582b3531c7"}},{"code_sha256_prefix":"d01f64c0eb3ed655","entry":"weight_decay_config","repo":"eladhoffer/convNet.pytorch","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/eladhoffer/convNet.pytorch/blob/HEAD/models/resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d01f64c0eb3ed655"}},{"code_sha256_prefix":"5aae301619477872","entry":"weight_decay_config","repo":"vaapopescu/gradient-pruning","repo_kind":"listed","path":"models/efficientnet.py","file_url":"https://github.com/vaapopescu/gradient-pruning/blob/HEAD/models/efficientnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5aae301619477872"}},{"code_sha256_prefix":"3fb114d023cdbf04","entry":"weight_decay_config","repo":"vaapopescu/gradient-pruning","repo_kind":"listed","path":"models/evolved.py","file_url":"https://github.com/vaapopescu/gradient-pruning/blob/HEAD/models/evolved.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3fb114d023cdbf04"}},{"code_sha256_prefix":"36d164db20c45f6d","entry":"conv_bn","repo":"vaapopescu/gradient-pruning","repo_kind":"listed","path":"models/inception_resnet_v2.py","file_url":"https://github.com/vaapopescu/gradient-pruning/blob/HEAD/models/inception_resnet_v2.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":"36d164db20c45f6d"}},{"code_sha256_prefix":"c852fbd4f3361928","entry":"conv_bn","repo":"vaapopescu/gradient-pruning","repo_kind":"listed","path":"models/inception_v2.py","file_url":"https://github.com/vaapopescu/gradient-pruning/blob/HEAD/models/inception_v2.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":"c852fbd4f3361928"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}