arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1911.07033cs.CVcs.LG
收藏

S2DNAS:通过神经结构搜索将静态CNN模型转换为动态推理

S2DNAS:Transforming Static CNN Model for Dynamic Inference via Neural Architecture Search

Peking University(北京大学);IBM Research(IBM研究院)

Zhihang Yuan, Bingzhe Wu, Zheng Liang, Shiwan Zhao, Weichen Bi, Guangyu Sun

摘要:

最近,动态推理已经成为降低深度卷积神经网络(CNN)计算成本的一种有前途的方法。与静态方法(例如权重修剪)相比,动态推理根据每个输入样本自适应地调整推理过程,这可以大大降低“简单”样本的计算成本,同时保持整体模型性能。在本文中,我们介绍了一个通用的框架,S2DNAS,它可以转换各种静态CNN模型,以支持动态推理,通过神经结构搜索。为此,基于给定的CNN模型,我们首先生成一个CNN架构空间,其中每个架构都是使用一些预定义的变换从给定模型生成的多级CNN。然后,我们提出了一种基于强化学习的方法来自动搜索生成的空间中的最佳CNN架构。最后,利用搜索到的多级网络,对每个样本自适应地选择一个评估阶段进行动态推理。与之前在推理中引入不规则计算或复杂控制器或从头开始重新设计CNN模型的工作不同,我们的方法可以推广到大多数流行的CNN架构,并且可以在各种硬件设备中使用现有的深度学习框架直接部署搜索到的动态网络。

英文摘要:

Recently, dynamic inference has emerged as a promising way to reduce the computational cost of deep convolutional neural network (CNN). In contrast to static methods (e.g. weight pruning), dynamic inference adaptively adjusts the inference process according to each input sample, which can considerably reduce the computational cost on "easy" samples while maintaining the overall model performance. In this paper, we introduce a general framework, S2DNAS, which can transform various static CNN models to support dynamic inference via neural architecture search. To this end, based on a given CNN model, we first generate a CNN architecture space in which each architecture is a multi-stage CNN generated from the given model using some predefined transformations. Then, we propose a reinforcement learning based approach to automatically search for the optimal CNN architecture in the generated space. At last, with the searched multi-stage network, we can perform dynamic inference by adaptively choosing a stage to evaluate for each sample. Unlike previous works that introduce irregular computations or complex controllers in the inference or re-design a CNN model from scratch, our method can generalize to most of the popular CNN architectures and the searched dynamic network can be directly deployed using existing deep learning frameworks in various hardware devices.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑