Sparse neural networks are important for achieving better generalization and enhancing computation efficiency. This paper proposes a novel learning approach to obtain sparse fully connected layers in neural networks (NNs) automatically. We design a switcher neural network (SNN) to optimize the structure of the task neural network (TNN). The SNN takes the weights of the TNN as the inputs and its outputs are used to switch the connections of TNN. In this way, the knowledge contained in the weights of TNN is explored to determine the importance of each connection and the structure of TNN consequently. The SNN and TNN are learned alternately with stochastic gradient descent (SGD) optimization, targeting at a common objective. After learning, we achieve the optimal structure and the optimal parameters of the TNN simultaneously. In order to evaluate the proposed approach, we conduct image classification experiments on various network structures and datasets. The network structures include LeNet, ResNet18, ResNet34, VggNet16 and MobileNet. The datasets include MNIST, CIFAR10 and CIFAR100. The experimental results show that our approach can stably lead to sparse and well-performing fully connected layers in NNs.
翻译:本文提出了一种创新的学习方法,以自动获得神经网络中完全连接的稀疏层; 我们设计了一个开关神经网络(SNN),以优化任务神经网络(TNN)的结构。 SNN采用TNN的权重,因为输入和输出都用于转换TNN的连接。通过这种方式,将探索TNN重量中所包含的知识,以确定TNN的每个连接和结构的重要性。SNN和TNN是用随机梯度下降(SGD)优化的交替学习的,以共同目标为对象。我们学习后,我们同时实现TNNN的最佳结构和最佳参数。为了评估拟议方法,我们在不同网络结构和数据集上进行图像分类实验。网络结构包括LeNet、ResNet18、ResNet34、VggNet16和MiveNet。数据集包括MNIST、CIFAR10和CIFAR100。实验结果显示,我们的方法可以稳定地导致低频和高频层。