让卷积神经网络动态选择重要通道,提速降耗还不需改代码。
CNN Mixture-of-Depths
- 按预测重要性动态选通道处理,跳过不重要的通道。
- ResNet50在ImageNet上性能提升0.45%,推理速度加快6%(CPU)5%(GPU)。
- 无需定制内核或微调,通用性强,适合部署优化场景。
我们提出卷积神经网络的深度混合(CNN Mixture-of-Depths, MoD),通过根据当前预测的相关性,有选择地处理特征图中的通道,从而提升计算效率。该方法在卷积块中动态选择关键通道进行聚焦处理,跳过不相关通道,实现资源优化。与需要动态计算图的条件计算不同,CNN MoD采用静态计算图和固定张量尺寸,提升硬件效率。训练与推理均无需定制CUDA内核、特殊损失函数或微调。在ImageNet上,ResNet86-MoD相比标准ResNet50性能提升0.45%,在CPU上提速6%,在GPU上提速5%;ResNet75-MoD达到与ResNet50相当性能的同时,分别实现25%(CPU)和15%(GPU)的速度提升。
原文摘要 · Abstract (English)
We introduce Mixture-of-Depths (MoD) for Convolutional Neural Networks (CNNs), a novel approach that enhances the computational efficiency of CNNs by selectively processing channels based on their relevance to the current prediction. This method optimizes computational resources by dynamically selecting key channels in feature maps for focused processing within the convolutional blocks (Conv-Blocks), while skipping less relevant channels. Unlike conditional computation methods that require dynamic computation graphs, CNN MoD uses a static computation graph with fixed tensor sizes which improve hardware efficiency. It speeds up the training and inference processes without the need for customized CUDA kernels, unique loss functions, or finetuning. CNN MoD either matches the performance of traditional CNNs with reduced inference times, GMACs, and parameters, or exceeds their performance while maintaining similar inference times, GMACs, and parameters. For example, on ImageNet, ResNet86-MoD exceeds the performance of the standard ResNet50 by 0.45% with a 6% speedup on CPU and 5% on GPU. Moreover, ResNet75-MoD achieves the same performance as ResNet50 with a 25% speedup on CPU and 15% on GPU.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。