模型裁剪--Rethinking the Value of Network Pruning

Rethinking the Value of Network Pruning
https://github.com/Eric-mingjie/rethinking-network-pruning

网络模型裁剪价值的重新思考

当前的深度学习网络模型一般都是 heavy computational cost,如何降低其计算量而尽可能保持网络性能是一个重要的研究课题。

在这里插入图片描述

标准的模型裁剪三部曲是:1)训练一个 large, over-parameterized network,得到最佳网络性能,以此为基准;2)基于一定的准则来裁剪大网络模型;3)在数据集上微调裁剪后的网络模型

在这个裁剪的过程中,存在两个 common beliefs:
1)一般认为一开始训练一个 large, over-parameterized network 是很重要的,以大模型的性能为基准进行裁剪,一般认为这个方式比从头训练一个小模型的方式是更好的。
2)一般认为裁剪后的网络模型结构及其参数权重都很重要。所以目前大部分方法都是在裁剪后的模型上进行微调,The preserved weights after pruning are usually considered to be critical

本文经过大量实验得出了两个较意外的结论:
1) 如果我们的目标小模型是事先确定的,那么可以直接在数据集上训练此模型,得到的性能是最佳的,不比微调的性能差

First, for pruning algorithms with predefined target network architectures (Figure 2), directly training the small target model
from random initialization can achieve the same, if not better, performance, as the model obtained from the three-stage pipeline. In this case, starting with a large model is not necessary and one could instead directly train the target model from scratch。

2)对于目标模型不是事先确定的情况,从头开始训练裁剪后的模型,其得到的网络性能也是最好的,不比微调的差。
for pruning algorithms without a predefined target network, training the pruned model from scratch can also achieve comparable or even better performance than fine-tuning. This observation shows that for these pruning algorithms,
what matters is the obtained architecture, instead of the preserved weights,

模型裁剪的过程本质上可能是一个最优网络结构的搜索过程
our results suggest that the value of automatic pruning algorithms may lie in identifying efficient structures and performing implicit architecture search, rather than selecting “important” weights

predefined and non-predefined (automatically discovered) target architectures
在这里插入图片描述

predefined target architectures 这里我们举一个例子来说明一下: prune 50% channels in each layer of VGG,不管是哪个具体的 channels 被裁剪,最终的网络结构是一样的。因为 the pruning algorithm 将每个网络层中 least important 50% channels 裁掉。具体裁剪的比例一般是经验或尝试决定 the ratio in each layer is usually selected through empirical studies or heuristics

网络模型可以使用以下几个指标来描述:
model size, memory footprint, the number of computation operations (FLOPs) and power usage

本文选择了三个数据集和三个标准的网络结构
CIFAR-10, CIFAR-100 , and ImageNet
VGG, ResNet, and DenseNet

6个网络裁剪方法:
L1-norm based Channel Pruning (Li et al., 2017)
ThiNet (Luo et al., 2017)
Regression based Feature Reconstruction (He et al., 2017b)
Network Slimming (Liu et al., 2017):
Sparse Structure Selection (Huang & Wang, 2018) :
Non-structured Weight Pruning (Han et al., 2015):

Training Budget. One crucial question is how long should we train the small pruned model from scratch?
如果从头训练小模型,那么训练时间即迭代次数是一个关键的问题

这里我们做了两个尝试:
Scratch-E 表示和训练大模型的迭代次数一样 to denote training the small pruned models for the same epochs
Scratch-B 表示两者的计算量一样(和大模型训练的计算量)to denote training for the same amount of computation budget

4 Experiments
4.1 Predefined target architectures

L1-norm based Channel Pruning (Li et al., 2017):
In each layer, a certain percentage of channels with smaller L1-norm of its filter weights will be pruned
在这里插入图片描述

ThiNet (Luo et al., 2017) greedily prunes the channel that has the smallest effect on the next layer’s activation values
在这里插入图片描述

Regression based Feature Reconstruction (He et al., 2017b)
prunes channels by minimizing the feature map reconstruction error of the next layer

在这里插入图片描述

最终的结论是: 当我们确定了最终的目标网络结构,从头训练小模型比微调小模型更好。从头训练小模型的计算量如果和大模型训练一样,那么其得到的网络性能比微调后的性能一般要好

4.2 Automatically discovered target architectures

Network Slimming (Liu et al., 2017):
imposes L 1 -sparsity on channel-wise scaling factors from Batch Normalization layers (Ioffe & Szegedy, 2015) during
training, and prunes channels with lower scaling factors afterward.

在这里插入图片描述

Sparse Structure Selection (Huang & Wang, 2018) :
uses sparsified scaling factors to prune structures, and can be seen as a generalization of Network Slimming. Other
than channels, pruning can be on residual blocks in ResNet or groups in ResNeXt (Xie et al., 2017)

在这里插入图片描述

Non-structured Weight Pruning (Han et al., 2015):
prunes individual weights that have small magnitudes. This pruning granularity leaves the weight matrices sparse, hence
it is commonly referred to as non-structured weight pruning.
在这里插入图片描述

4.3 Transfer Learning to object detection

we evaluate the L1-norm based pruning method on the PASCAL VOC object detection task, using Faster-RCNN
在这里插入图片描述

Prune-C refers to pruning on classifcation pre-trained weights
Prune-D refers to pruning after the weights are transferred to detection task

5 Network pruning as architecture search
在这里插入图片描述

在这里插入图片描述
不同网络层裁剪的幅度不一样

在这里插入图片描述

11

  • 3
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
### 回答1: Inception 架构是一种用于计算机视觉的神经网络架构,它通过使用不同尺寸的卷积核来捕捉图像中的不同级别特征。近年来,研究者们对 Inception 架构进行了重新思考,提出了许多改进版本,如 Inception-v2 和 Inception-v3。这些改进版本通过更深层次的网络结构、更高效的卷积层、更强大的正则化方法等来增强模型的性能。 ### 回答2: "重新思考计算机视觉中的Inception架构"是指对计算机视觉中的Inception架构进行反思和重新设计的过程。 在计算机视觉中,深度学习网络被广泛应用于图像分类、物体检测和语义分割等任务。Inception架构是一种流行的深度学习架构之一,它的特点是使用了一系列不同尺寸的卷积核和Inception模块,以提取不同尺度下的图像特征。 然而,随着计算机视觉任务的不断发展和挑战的出现,人们开始重新思考和改进Inception架构。对Inception架构的重新思考主要包括以下几个方面: 首先,针对Inception架构中的参数数量过多和计算复杂度高的问题,人们提出了一些改进方法。例如,通过降低Inception模块中卷积核的维度和参数数量,可以减少计算量,提高网络的训练和推理效率。 其次,人们提出了一些新的模块和网络结构,以解决Inception架构在某些任务上的性能限制。例如,ResNet和DenseNet等网络结构通过引入残差连接和稠密连接,解决了深度网络中的梯度消失和信息丢失问题。 此外,人们还关注如何将Inception架构与其他架构进行融合,以进一步提升计算机视觉任务的性能。例如,人们将Inception架构与注意力机制相结合,以提高目标检测和图像分割的准确性。 总之,"重新思考计算机视觉中的Inception架构"是一个不断演进的过程。通过反思和优化Inception架构,人们可以提高计算机视觉任务的性能、准确性和效率,推动计算机视觉领域的发展。 ### 回答3: 重新思考计算机视觉中的初始架构(rethinking the inception architecture for computer vision)是指对计算机视觉模型中的初始网络架构进行重新思考和改进。 计算机视觉是人工智能领域中的一个重要分支,它致力于让计算机能够像人一样理解和处理图像和视频。而计算机视觉模型的架构对于模型的性能和效果具有很大的影响。 Inception架构是一种经典的计算机视觉模型架构,最早由谷歌在2014年提出。它通过使用多尺度的卷积层和并行结构来提高模型的性能和效果。然而,随着技术的发展和需求的变化,原始的Inception架构可能存在一些限制和缺陷。 重新思考Inception架构意味着我们需要针对当前的计算机视觉任务和要求,重新设计和改进Inception架构。有几个方面可以考虑: 首先,我们可以通过引入更先进的卷积技术和结构来改善模型的性能。例如,可以使用Dilated Convolution(空洞卷积)来增加感受野,或者使用Depthwise Separable Convolution(分离卷积)来减少参数量和计算量。 其次,我们可以将其他经典和有效的架构和思想与Inception架构相结合,以进一步提升性能。例如,可以引入残差连接(Residual Connection)来加快训练速度和提高模型的泛化能力。 此外,我们还可以针对具体的计算机视觉任务,对Inception架构进行特定的优化。例如,对于目标检测任务,可以加入适应性池化层(Adaptive Pooling Layer)来获得更好的位置和尺度信息。 总之,重新思考Inception架构是一个不断改进和优化计算机视觉模型的过程。通过结合新的技术、思想和任务需求,我们可以进一步提高计算机视觉模型的性能和效果。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值