Classification method and system based on one-time automatic network pruning
Through the automated network pruning method, we can solve the problem of low efficiency in image data classification without necessary parameters and optimize the network structure, and solve the problem of low efficiency in image classification under high-resolution large data volume, and realize the resource-constrained environment efficient image classification processing.
Patent Information
- Application Number
- CN202410943248.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-22
AI Technical Summary
The prior art has problems with low efficiency in image data classification, especially in the case of high resolution and large data volume, which is difficult to effectively process.
Using a classification method based on one-time automated network pruning, the classification network is predicted through the trained pruning network, the degree of sparseness is set and parameters whose prediction importance score is lower than the threshold are cut off, and the retention importance is not low. Based on the threshold parameters, the pruning classification network is obtained, and the iterative pruning method is used to continuously optimize the importance of parameters, and finally a pruning system is built for image classification.
While maintaining high recognition accuracy, it effectively reduces the parameters and computing needs of neural networks, improves the efficiency of image classification processing, and performs excellently in resource-constrained environments.
Smart Images

Figure CN119006883A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a classification method and system based on one-time automatic network pruning. Background Art
[0002] Image recognition is an important application area of neural networks in the real world. By classifying, detecting and segmenting images, it is widely used in autonomous driving, medical diagnosis, security monitoring and other fields. However, the resolution of existing images is getting higher and higher, and the amount of data is getting larger and larger. Therefore, the classification of image data is becoming more and more difficult and inefficient. Summary of the invention
[0003] The purpose of the present invention is to propose a classification method and system based on one-time automatic network pruning in view of the low efficiency of the existing technology in classifying image data.
[0004] The technical solution adopted by the present invention to solve the above technical problems is:
[0005] A classification method based on one-time automated network pruning, the method comprising the following steps:
[0006] Obtain a multi-category image to be classified, and input the multi-category image into a trained classification network to obtain a classification result, wherein the trained classification network is obtained by the following steps:
[0007] Step 1: Use the trained pruned network to predict the importance of parameters of the classification network, set the sparsity degree, and use the set sparsity degree as a threshold to prune parameters whose predicted importance scores are lower than the threshold, and retain parameters whose importance is not lower than the threshold, thereby obtaining the pruned classification network;
[0008] Step 2: Obtain multi-category images and the labels corresponding to each category in the images to construct a training set;
[0009] Step 3: Use the training set to train the pruned classification network to obtain a trained classification network;
[0010] The trained pruned network is obtained by the following steps:
[0011] Step 1: Iteratively prune the neural network to obtain the importance score of each parameter in the neural network;
[0012] Step 2: Use each parameter and its corresponding gradient as input and the parameter importance score as output to train the pruned network and obtain the trained pruned network.
[0013] Furthermore, the multi-category images in step 2 are images after standardization processing, and the standardization processing includes scaling, cropping, graying, normalization and data enhancement.
[0014] Furthermore, the classification network is ResNet, VGGNet or MobileNet.
[0015] Furthermore, the iterative pruning is performed by a SNIP method.
[0016] Furthermore, the iterative pruning is specifically as follows:
[0017] Assign a binary mask to each parameter in the neural network, and initialize each binary mask to 1, set the sparsity degree ∈ and the number of sparse iterations N of the pruning process, then perform pruning iterations, and update the value of the binary mask corresponding to the parameter removed during the iteration to 0, and finally obtain the importance of each parameter
[0018] Furthermore, the importance of the parameters It is expressed as:
[0019]
[0020] Among them, m i Indicates the mask value of the parameter after the i-th pruning.
[0021] A classification system based on one-time automatic network pruning, the system comprising a pruning network training module, a classification network training module and a classification module;
[0022] The pruning network training module specifically performs the following steps:
[0023] Step 1: Iteratively prune the neural network to obtain the importance score of each parameter in the neural network;
[0024] Step 2: Use each parameter and its corresponding gradient as input and the parameter importance score as output to train the pruned network and obtain the trained pruned network;
[0025] The classification network training module specifically performs the following steps:
[0026] Step 1: Use the trained pruned network to predict the importance of parameters of the classification network, set the sparsity degree, and use the set sparsity degree as a threshold to prune parameters whose predicted importance scores are lower than the threshold, and retain parameters whose importance is not lower than the threshold, thereby obtaining the pruned classification network;
[0027] Step 2: Obtain multi-category images and the labels corresponding to each category in the images to construct a training set;
[0028] Step 3: Use the training set to train the pruned classification network to obtain a trained classification network;
[0029] The classification module specifically performs the following steps:
[0030] Get the multi-category images to be classified, and input the multi-category images into the trained classification network to get the classification results.
[0031] Furthermore, the multi-category images are images after standardization processing, and the standardization processing includes scaling, cropping, grayscale, normalization and data enhancement;
[0032] The classification network is ResNet, VGGNet or MobileNet;
[0033] The iterative pruning is performed by the SNIP method.
[0034] Furthermore, the iterative pruning is specifically as follows:
[0035] Assign a binary mask to each parameter in the neural network, and initialize each binary mask to 1, set the sparsity degree ∈ and the number of sparse iterations N of the pruning process, then perform pruning iterations, and update the value of the binary mask corresponding to the parameter removed during the iteration to 0, and finally obtain the importance of each parameter
[0036] Furthermore, the importance of the parameters It is expressed as:
[0037]
[0038] Among them, m i Indicates the mask value of the parameter after the i-th pruning.
[0039] The beneficial effects of the present invention are:
[0040] This application introduces a data-driven initialization pruning method, which can effectively reduce the parameters and computing requirements of the neural network in image classification tasks, and improve the application performance of the network in resource-constrained environments. This application can improve the efficiency of image classification processing while maintaining high recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is the overall flow chart of the framework of the pruning method;
[0042] Figure 2 Comparison chart of network prediction importance before and after training;
[0043] Figure 3This is a comparison chart of the experimental results of network pruning in this application and traditional pruning methods;
[0044] Figure 4 A comparison chart of experimental results of replacing different network models for this application. DETAILED DESCRIPTION
[0045] It should be particularly noted that, in the absence of conflict, the various embodiments disclosed in this application can be combined with each other.
[0046] Specific implementation method 1: refer to Figure 1 Specifically describing this embodiment, the classification method based on one-time automatic network pruning described in this embodiment is characterized in that the method comprises the following steps:
[0047] Obtain a multi-category image to be classified, and input the multi-category image into a trained classification network to obtain a classification result, wherein the trained classification network is obtained by the following steps:
[0048] Step 1: Use the trained pruned network to predict the importance of parameters of the classification network, set the sparsity degree, and use the set sparsity degree as a threshold to prune parameters whose predicted importance scores are lower than the threshold, and retain parameters whose importance is not lower than the threshold, thereby obtaining the pruned classification network;
[0049] Step 2: Obtain multi-category images and the labels corresponding to each category in the images to construct a training set;
[0050] Step 3: Use the training set to train the pruned classification network to obtain a trained classification network;
[0051] The trained pruned network is obtained by the following steps:
[0052] Step 1: Iteratively prune the neural network to obtain the importance score of each parameter in the neural network;
[0053] Step 2: Use each parameter and its corresponding gradient as input and the parameter importance score as output to train the pruned network and obtain the trained pruned network.
[0054] Specific implementation method 2: This implementation method is a further explanation of specific implementation method 1. The difference between this implementation method and specific implementation method 1 is that the multi-category images in step 2 are images after standardization processing, and the standardization processing includes scaling, cropping, grayscale, normalization and data enhancement.
[0055] Specific implementation method three: This implementation method is a further explanation of specific implementation method one. The difference between this implementation method and specific implementation method one is that the classification network is ResNet, VGGNet or MobileNet.
[0056] Specific implementation method 4: This implementation method is a further description of the specific implementation method 1. The difference between this implementation method and the specific implementation method 1 is that the importance score of the parameter is expressed as:
[0057]
[0058] Among them, θ represents the weight of the parameter, g represents the gradient, Represents a dataset.
[0059] Specific implementation mode five: This implementation mode is a further description of specific implementation mode one. The difference between this implementation mode and specific implementation mode one is that the iterative pruning is performed by the SNIP method.
[0060] Specific implementation method 6: This implementation method is a further explanation of the specific implementation method 5. The difference between this implementation method and the specific implementation method 5 is that the iterative pruning is specifically as follows:
[0061] Assign a binary mask to each parameter in the neural network, and initialize each binary mask to 1, set the sparsity degree ε and the number of sparse iterations N of the pruning process, then perform pruning iterations, and update the value of the binary mask corresponding to the parameter removed during the iteration to 0, and finally obtain the importance of each parameter;
[0062] Importance of parameters It is expressed as:
[0063]
[0064] Among them, m i Indicates the mask value of the parameter after the i-th pruning.
[0065] Specific implementation method 7: The classification system based on one-time automatic network pruning described in this implementation method includes a pruning network training module, a classification network training module and a classification module;
[0066] The pruning network training module specifically performs the following steps:
[0067] Step 1: Iteratively prune the neural network to obtain the importance score of each parameter in the neural network;
[0068] Step 2: Use each parameter and its corresponding gradient as input and the parameter importance score as output to train the pruned network and obtain the trained pruned network;
[0069] The classification network training module specifically performs the following steps:
[0070] Step 1: Use the trained pruned network to predict the importance of parameters of the classification network, set the sparsity degree, and use the set sparsity degree as a threshold to prune parameters whose predicted importance scores are lower than the threshold, and retain parameters whose importance is not lower than the threshold, thereby obtaining the pruned classification network;
[0071] Step 2: Obtain multi-category images and the labels corresponding to each category in the images to construct a training set;
[0072] Step 3: Use the training set to train the pruned classification network to obtain a trained classification network;
[0073] The classification module specifically performs the following steps:
[0074] Get the multi-category images to be classified, and input the multi-category images into the trained classification network to get the classification results.
[0075] Specific implementation eight: This implementation is a further explanation of specific implementation seven. The difference between this implementation and specific implementation seven is that the multi-category images are images after standardization processing, and the standardization processing includes scaling, cropping, graying, normalization and data enhancement;
[0076] The classification network is ResNet, VGGNet or MobileNet;
[0077] The iterative pruning is performed by the SNIP method.
[0078] Specific implementation method 9: This implementation method is a further description of specific implementation method 7. The difference between this implementation method and specific implementation method 7 is that the importance score of the parameter is expressed as:
[0079]
[0080] Among them, θ represents the weight of the parameter, g represents the gradient, Represents a dataset.
[0081] Specific implementation method ten: This implementation method is a further description of specific implementation method nine. The difference between this implementation method and specific implementation method nine is that the iterative pruning is specifically as follows:
[0082] Assign a binary mask to each parameter in the neural network, and initialize each binary mask to 1, set the sparsity degree ε and the number of sparse iterations N of the pruning process, then perform pruning iterations, and update the value of the binary mask corresponding to the parameter removed during the iteration to 0, and finally obtain the importance of each parameter;
[0083] Importance of parameters It is expressed as:
[0084]
[0085] Among them, m i Indicates the mask value of the parameter after the i-th pruning.
[0086] Neural network pruning is a technique that has been used for decades to selectively remove non-essential parameters in a network to maintain the network's inference accuracy while reducing computational requirements. This approach is particularly beneficial in resource-constrained environments (such as mobile devices) as it can speed up response times and reduce energy consumption.
[0087] Traditional neural network pruning methods usually use multiple rounds of training-pruning-training iterations. Although this method can significantly reduce the model parameters and computational complexity after pruning, the training cost during the pruning process is high. In image recognition tasks, training large-scale networks itself requires a lot of computing resources and time, and traditional iterative pruning methods further increase training costs.
[0088] Recent research has shown that pruning can be performed early in training, significantly reducing training time and resource usage. The Lottery Ticket Hypothesis, a theory of interpretability for neural networks, suggests that efficient subnetworks can be identified early in the training process that are able to achieve comparable accuracy to fully trained ones. Using initialization pruning methods, important parameters can be identified when the network is initialized, and non-essential parameters can be pruned, thereby reducing the computational requirements for training and inference while maintaining recognition accuracy.
[0089] Several methods for initialization pruning have been proposed, focusing on various criteria for evaluating parameter importance, such as SNIP, GraSP, and Synflow. These methods evaluate the importance of parameters through manually designed criteria, which, while effective in some cases, usually cannot achieve the performance of traditional iterative pruning at high sparsity. However, how to minimize the accuracy gap between initialization pruning and iterative pruning, and the ideal pruning criteria may be too complex for researchers to discover and manually design.
[0090] The automated pruning network is an end-to-end neural network that can automatically learn to initialize pruning criteria from iterative pruning and predict which parameters should be pruned. The present application first determines the importance of parameters through iterative pruning, and uses these importance scores as a training data set for the automated pruning network. In order to decide which parameters to keep after initialization, the automated pruning network uses the parameters and their corresponding gradients running on the data set as input to predict the importance scores. Then, the parameters with the lowest scores are pruned according to the specified degree of sparsity. It is worth noting that existing pruning methods can apply the same pruning strategy to multiple networks because the logic of model pruning remains consistent between different networks. After training on a specific data set, the present application can also generalize well to untrained networks. Although the present application requires an iterative training data set, only one iterative training is required. In addition, experiments have shown that the effectiveness of an ideal data set is determined by its quality rather than its size. The present application has conducted extensive experiments to demonstrate the effectiveness of the present application method. The automated pruning network is the first data-driven standard for initializing pruning. The main core content of this application is as follows:
[0091] (1) We propose a novel initialization pruning method (automatic pruning network) that uses an end-to-end neural network to determine which parameters to prune. This method introduces a revolutionary way of thinking in this field, shifting from traditional human-designed standard methods to data-driven, automated pruning.
[0092] (2) Extensive experiments show that automated network pruning can achieve high initialization pruning accuracy, outperforming other methods. This also shows that data-driven initialization pruning methods can achieve high performance.
[0093] Pruning formula
[0094] Assume there is a parameter The neural network represented by and its corresponding pruning mask m∈{0,1} k A pruned subnetwork can be generated by θ⊙m, where ⊙ represents the Hadamard product. Given the target dataset and a desired sparsity level ∈∈[0,1], the pruning problem can be formulated as:
[0095]
[0096] Where e is the loss function.
[0097] This application proposes a novel method - autonomously discovering pruning criteria through neural network models. This application intuitively assumes that iterative pruning is the optimal goal. Therefore, given a neural network and a corresponding dataset, the goal of this application is to design a network that prunes redundant parameters before training begins. The next section will describe how this application implements learning of pruning strategies through the network.
[0098] Data-driven initial pruning criteria
[0099] In order to identify and remove unimportant parameters, their importance scores must first be determined. This application uses an end-to-end neural network model called automated pruning network to automatically learn the sparsity criterion through iterative pruning. This method involves inputting the network parameters θ into the model. Target dataset The gradient g on or other pre-training features are used to predict the importance of these parameters. Once the importance scores are obtained, the application will prune the parameters with the lowest scores to achieve the desired sparsity. Figure 1 (b) illustrates this end-to-end prediction process. In the experiment, this application evaluates the parameters and gradients. The score can be written as:
[0100]
[0101] Dataset generation and training
[0102] In order to use the automated pruning network to predict the importance scores of network parameters, this application needs to obtain a real dataset of the automated pruning network. Iterative pruning methods are known for their ability to maintain high accuracy despite significant sparsity. This method progressively removes unimportant parameters during training to progressively optimize the network. By exploiting this property, the application tracks how long parameters remain in the network. Those parameters that are pruned early are considered less important than those that remain until later. Figure 1 (a) shows this process.
[0103] In this application method, SNIP is used as an iterative pruning method. Each parameter is assigned a binary mask m∈{0,1} k , initialized to 1. This application defines the sparsity degree ∈ and the number of sparse iterations N of the pruning process. In each training iteration, some parameters are removed and the corresponding mask values are updated to 0. This iterative process results in a mask m after i prunings i The importance of each parameter is denoted by Depending on how long it is kept in the training rounds, it can be formulated as:
[0104]
[0105] After completing the dataset, this application selects the ResNet model as the backbone of the automated pruning network and adds an encoding layer to match the input features. Unlike traditional data-driven methods that may face generalization limitations, the automated pruning network can generalize well to unknown networks trained using certain datasets. Similar to SNIP, a pruning strategy can be applied to different networks.
[0106] Data collection and preprocessing
[0107] Data collection: Collect and annotate the datasets required for image recognition tasks, such as ImageNet, CIFAR-10, etc. These datasets contain images of multiple categories and their corresponding labels.
[0108] Data preprocessing: Standardize the image data, including scaling, cropping, grayscale (if necessary), normalization, and data augmentation to improve the generalization ability of the model.
[0109] Initial model training
[0110] Select model architecture: Choose a neural network architecture suitable for image recognition tasks, such as ResNet, VGG, or MobileNet.
[0111] Train the initial model: Use the preprocessed dataset to train the initial neural network model to obtain its initial parameters and performance indicators.
[0112] Iterative pruning and parameter importance evaluation
[0113] Iterative pruning: Iteratively prune the initially trained model, gradually remove unnecessary parameters, and record the impact of each parameter on the model performance, that is, the importance score of the parameter.
[0114] Generate training data set: The parameter importance scores recorded during the iterative pruning process are used as training data sets to train the automated pruning network.
[0115] Automatically train pruned networks
[0116] Build an automated pruning network: Design and build an end-to-end neural network with parameters and their corresponding gradients as input and predicted parameter importance scores as output.
[0117] Train the automated pruned network: Use the generated training dataset to train the automated pruned network so that it can learn from the data and predict the importance of parameters.
[0118] Initialize pruning
[0119] Parameter prediction: Use the trained automatic pruning network to predict the importance of parameters of the pruned neural network.
[0120] Pruning operation: According to the specified sparsity level, the parameters with the lowest predicted importance scores are pruned, and the parameters with high importance are retained.
[0121] Model fine-tuning and optimization
[0122] Model fine-tuning: Fine-tune the pruned neural network and further train it using the preprocessed dataset to restore or improve the recognition accuracy of the model.
[0123] Performance evaluation: Use the validation and test datasets to evaluate the performance of the pruned model to ensure that it can maintain high accuracy even with high sparsity.
[0124] Model deployment
[0125] Optimization and conversion: Optimize and convert the pruned neural network model to adapt to the hardware platform in the actual application environment (such as mobile devices, embedded systems, etc.).
[0126] Deployment and application: Embed the optimized model into the image recognition system to implement real-time or batch image recognition tasks.
[0127] This application evaluates the performance of various previous initialization pruning methods and the automatic pruning of this application on image classification datasets such as CIFAR-10, CIFAR-100 and MNIST, using various network architectures. Figure 3 The performance comparison of SNIP, GraSP, random methods and automated pruning is shown. For reference, the performance of the unpruned dense model is also included in this application.
[0128] (1) Experimental setup
[0129] This application uses CIFAR-10 to train ResNet-18, and uses SNIP to iteratively perform 20 cycles of pruning to generate a dataset. This application then uses this dataset to train automatic pruning and ResNet-18, and finally prunes various networks.
[0130] (2) Analysis
[0131] exist Figure 3 In the , the accuracy of automated pruning on VGG-16 is 2% higher than that of SNIP, and the performance on CIFAR-10 is similar. On VGG-19, the method of this application is 2% more accurate than SNIP. On ResNet-18, the method of this application is 0.8% more accurate than SNIP at 0.05 sparsity (i.e., only 5% parameters are retained), and 0.5% higher at 0.01 sparsity. This proves that the method of this application is effective for initialization pruning and can generalize well to unknown networks.
[0132] exist Figure 4 In this paper, the automatic pruning network using ResNet-18 and VGG-19 is also implemented, and training is performed on ResNet-18 (CIFAR-10), VGG-19 (CIFAR-100), and LeNet-300-100 (MNIST) to prune VGG and ResNet models. The results are shown in Figure 2. Figure 4 As shown, the data set pruning results (LTH method and SNIP-iter method) are also included. It can be seen that when trained with ResNet-18 (CIFAR-10), the method of the present application performs poorly on MNIST. However, the results of training with LeNet-300-100 (MNIST) show effective pruning effects on MNIST. In addition, the automated pruned network trained with the minimal model LeNet-300-100 (MNIST) performs well in all these network pruning tasks, with only a slight decrease in accuracy compared to the original data set.
[0133] (3) Visualization of Rating Predictions
[0134] Figure 2 (a) is the prediction result before automatic pruning training. Figure 2 (b) is the prediction result after automatic pruning training. The X-axis represents the parameter, the Y-axis represents the gradient, and the Z-axis represents the importance. The red dot represents the value of the dataset, and the blue dot represents the predicted value.
[0135] (4) Prediction Visualization
[0136] In order to better understand the prediction content of automatic pruning, this application Figure 2 The importance and predicted values of the dataset are visualized in Figure 2 As can be seen in (b), the automated pruning learns from the iterative pruning process that the parameter values have a strong relationship with the parameter scores: higher absolute parameter values have relatively higher scores. This result is consistent with LTH [3], even though the automated pruning is trained with SNIP. In addition, the gradient has a weak relationship with the parameter score. This is evident because only a few points with high gradients have high scores, while many points with gradients close to 0 still have large scores. However, Figure 2 The real dataset in has more chaotic performance on these two features.
[0137] Based on the above experimental results, it can be seen that this method proposes a new one-time neural network pruning framework, which can automatically judge the importance of parameters and achieve the purpose of completing the pruning task when the network is initialized. Compared with previous methods, the prediction accuracy of the one-time pruning network after pruned in image recognition tasks is improved. At the same time, the method is generalizable and can be used for different image recognition neural networks and data sets.
[0138] It should be noted that the specific implementation is only an explanation and description of the technical solution of the present invention, and cannot be used to limit the scope of protection of the rights. Any partial changes made according to the claims and description of the present invention should still fall within the scope of protection of the present invention.
Claims
1. A classification method based on one-time automated network pruning, characterized by The method comprises the following steps: Obtain a multi-category image to be classified, and input the multi-category image into a trained classification network to obtain a classification result, wherein the trained classification network is obtained by the following steps: Step 1: Use the trained pruned network to predict the importance of parameters of the classification network, set the sparsity degree, and use the set sparsity degree as a threshold to prune parameters whose predicted importance scores are lower than the threshold, and retain parameters whose importance is not lower than the threshold, thereby obtaining the pruned classification network; Step 2: Obtain multi-category images and the labels corresponding to each category in the images to construct a training set; Step 3: Use the training set to train the pruned classification network to obtain a trained classification network; The trained pruned network is obtained by the following steps: Step 1: Iteratively prune the neural network to obtain the importance score of each parameter in the neural network; Step 2: Use each parameter and its corresponding gradient as input and the parameter importance score as output to train the pruned network and obtain the trained pruned network.
2. The one-time automated network pruning method for image recognition networks according to claim 1, characterized in that The multi-category images in step 2 are images after standardization processing, and the standardization processing includes scaling, cropping, grayscale, normalization and data enhancement.
3. The one-time automated network pruning method for image recognition networks according to claim 1, characterized in that The classification network is ResNet, VGGNet or MobileNet.
4. The one-time automated network pruning method for image recognition networks according to claim 1, characterized in that The iterative pruning is performed by the SNIP method.
5. The one-time automated network pruning method for image recognition networks according to claim 4, characterized in that The iterative pruning is specifically as follows: Assign a binary mask to each parameter in the neural network, and initialize each binary mask to 1, set the sparsity degree ∈ and the number of sparse iterations N of the pruning process, then perform pruning iterations, and update the value of the binary mask corresponding to the parameter removed during the iteration to 0, and finally obtain the importance of each parameter 6. The one-time automated network pruning method for image recognition networks according to claim 5, characterized in that Importance of the parameters mentioned It is expressed as: Among them, m i Indicates the mask value of the parameter after the i-th pruning.
7. A classification system based on one-time automated network pruning, characterized by The system includes a pruning network training module, a classification network training module and a classification module; The pruning network training module specifically performs the following steps: Step 1: Iteratively prune the neural network to obtain the importance score of each parameter in the neural network; Step 2: Use each parameter and its corresponding gradient as input and the parameter importance score as output to train the pruned network and obtain the trained pruned network; The classification network training module specifically performs the following steps: Step 1: Use the trained pruned network to predict the importance of parameters of the classification network, set the sparsity degree, and use the set sparsity degree as a threshold to prune parameters whose predicted importance scores are lower than the threshold, and retain parameters whose importance is not lower than the threshold, thereby obtaining the pruned classification network; Step 2: Obtain multi-category images and the labels corresponding to each category in the images to construct a training set; Step 3: Use the training set to train the pruned classification network to obtain a trained classification network; The classification module specifically performs the following steps: Get the multi-category images to be classified, and input the multi-category images into the trained classification network to get the classification results.
8. The one-time automated network pruning system for image recognition networks according to claim 7, characterized in that The multi-category images are images after standardization processing, and the standardization processing includes scaling, cropping, grayscale, normalization and data enhancement; The classification network is ResNet, VGGNet or MobileNet; The iterative pruning is performed by the SNIP method.
9. The one-time automated network pruning system for image recognition networks according to claim 8, characterized in that The iterative pruning is specifically as follows: Assign a binary mask to each parameter in the neural network, and initialize each binary mask to 1, set the sparsity degree ∈ and the number of sparse iterations N of the pruning process, then perform pruning iterations, and update the value of the binary mask corresponding to the parameter removed during the iteration to 0, and finally obtain the importance of each parameter 10. The one-time automatic network pruning system for image recognition network according to claim 9, characterized in that Importance of the parameters mentioned It is expressed as: Among them, m i Indicates the mask value of the parameter after the i-th pruning.
