An efficient neural network searching and training method based on pruning technology
By introducing differentiable architecture search and model pruning techniques, the neural network architecture is automatically designed, solving the problem of limited computing resources in SAR image ship target detection, achieving efficient and high-precision ship target detection, and is suitable for edge devices.
Patent Information
- Application Number
- CN202211192735.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-09-28
AI Technical Summary
In existing technologies for ship target detection in SAR images, limited computing resources and the need for extensive manual tuning to design lightweight neural network models make it difficult to balance detection efficiency and accuracy. Furthermore, the large number of model parameters and computational load makes it impossible to apply efficiently on edge devices.
By introducing differentiable architecture search technology and model pruning technology, and through automated design of neural network architecture, combined with channel pruning and model pruning, the computational cost and accuracy of the neural network model are optimized, thereby achieving efficient ship target detection.
The system automatically designs efficient neural network models, improving detection efficiency, reducing design costs, solving overfitting problems, meeting detection accuracy and efficiency requirements, and is suitable for edge devices with limited computing resources.
Smart Images

Figure CN115688908B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of information technology, and in particular designs an efficient neural network search and training method based on pruning technology. BACKGROUND
[0002] Currently, there are two common solutions for the target detection task of SAR image ship targets:
[0003] 1. Before the rise of neural network technology, artificial feature extraction is used for SAR images. Because the radar echo intensity of different objects is different, typical features of SAR images such as contrast, gray level, shape, etc. can be used to distinguish ships and backgrounds. These methods are limited by experts' field knowledge and are limited to fixed pattern matching of one or a few features, which causes great loss in detection accuracy and may have natural defects in detection.
[0004] 2. In recent years, it has become increasingly common to introduce special neural networks for feature extraction. This greatly avoids complex and difficult manual priors. For example, a ship target detector based on Faster R-CNN is obtained, and further modification obtains better accuracy. A deep neural network target detector based on multi-task learning, however, these studies do not pay enough attention to detection efficiency, so they cannot meet the requirements of limited computing resources on edge devices. At the same time, it is not a simple task to design a usable and excellent neural network model for a specific target task, and experts need to spend a lot of time to optimize and train the neural network model, which is not conducive to the application and improvement of the neural network model in the SAR image ship target detection task.
[0005] 3. In order to solve the problem of limited computing resources, more and more lightweight networks are designed to be applied in target detection field, such as the accelerated version YOLOv3 for ship detection, which uses fewer channels and convolution operations to achieve higher detection speed with smaller model size compared with normal YOLOv3; an efficient ship target detector TinyYOLO-Lite based on YOLOV3 is designed, which combines model pruning and knowledge distillation technology to ensure efficiency and accuracy and effectively reduces the theoretical calculation amount of the model. The emergence of these lightweight neural network models makes the ship target detection task more efficient and can be deployed on more portable devices. However, designing such lightweight neural network models still requires neural network designers to have sufficient knowledge in the field of neural networks, and in the trade-off between efficiency and accuracy, a large number of experiments are needed to verify and optimize. The model pruning technology is also explored in a large number of trial and error costs, which also requires a great time cost. At the same time, it is observed that the current lightweight neural network model has a large model parameter amount and theoretical calculation amount, and the current design has not pushed the efficiency of the model to the limit. SUMMARY
[0006] For the task of ship target detection in SAR image, in order to avoid excessive human prior participation in the process of designing neural network model, reduce the complexity and time cost of designing neural network model, the present application discloses a differentiable neural network search and training method for ship target detection task in SAR image considering detection efficiency and accuracy. The present application introduces the differentiable architecture search (DARTS) technology into the field of ship target detection in SAR image, which can automatically customize the design and construction of neural network model. In order to further reduce the size and calculation amount of neural network model and solve the serious overfitting problem of model and improve the efficiency of ship target detection, the present application introduces channel pruning technology and model pruning into the DARTS process, and the theoretical calculation amount of model is included in the evaluation function of DARTS, so that the neural network model architecture searched finally meets the requirements of detection accuracy and detection efficiency.
[0007] In order to solve the problems existing in the prior art, the present application automatically designs a neural network architecture through a differentiable architecture search technology for a SAR image ship target detection task on a set search space, puts the theoretical calculation amount of the model into the evaluation function of the differentiable architecture search, and introduces model pruning and channel pruning into the search process, so that the finally obtained neural network architecture meets the task requirements in efficiency and accuracy, and solves the serious overfitting problem existing in the search and training process.
[0008] Technical scheme
[0009] The efficient neural network search and training method based on pruning technology disclosed by the present application mainly includes two parts of neural architecture search and neural architecture model training, and the model pruning and channel pruning technology is applied in the neural architecture search process, an efficient neural network architecture is designed through automatic search, the specific network layer number of the finally derived subnetwork model is determined through the model pruning technology in the search process, and the channel number of the corresponding operation in the final subnetwork model is determined through the channel pruning technology. After the specific subnetwork model is derived, the final neural network model is generated according to the network architecture obtained by searching and the related model parameters, and training is performed from the beginning, so as to achieve the goals of efficiency and accuracy.
[0010] In order to achieve the above-mentioned purpose, the technical scheme of the present application is as follows: an efficient neural network search and training method based on pruning technology, characterized in that the method comprises the following steps:
[0011] Step 1: the super network is optimized and updated under the guidance of the loss function containing the theoretical calculation amount of the model through the differentiable architecture search, and the best neural network unit structure is determined;
[0012] Step 2: the best channel shielding parameter is explored by using the channel pruning technology in the search process, and the best neural network model unit stacking number is explored by using the model pruning technology;
[0013] Step 3: after the neural architecture search process is completed, that is, the neural network unit structure has been determined, and the model unit stacking number and the channel shielding parameter have been specified, the subnetwork is derived according to the current state of the super network;
[0014] Step 4: according to the derived neural network architecture, the channel shielding parameter and the neural network model unit stacking number, a complete neural network model is constructed, and training is performed for ship target detection.
[0015] In step 1, the theoretical calculation amount of the neural network model is put into the loss function of the differentiable architecture search:
[0016] Loss = acc_ratio x Loss CE + ops_ratio x log(Ops)
[0017] The symbols are explained as follows:
[0018] acc_ratio represents the weight term of detection accuracy loss;
[0019] Loss CE represents the accuracy cross-entropy loss of the current neural network model, which is obtained by comparing the prediction result of the input image through the current model with the true value of the image;
[0020] ops_ratio represents the weight of the theoretical calculation amount of the model, and the two weight terms balance the accuracy and efficiency of the final derived model of neural architecture search;
[0021] Ops represents the sum of the weighted theoretical calculation amount of the current neural network model according to the current architecture parameters.
[0022] In step 2, by setting the channel mask parameter K and automatically exploring and determining in the architecture search process:
[0023]
[0024]
[0025]
[0026] The symbols are explained as follows:
[0027] o represents the type of operation to be selected
[0028] O represents the set of candidate operations
[0029] represents the weight of the candidate operation o
[0030] represents the input data participating in the calculation of the neural network model
[0031] represents the input data not participating in the calculation
[0032] x i represents the complete input data
[0033] S i,j represents a channel mask matrix composed of 0 and 1, and its size dimension corresponds to the input data x i K is used to determine S i,j 1 / K part is 1 and other parts are 0.
[0034] In step 2, the number of stacked units L of the model is gradually reduced, and the number of stacked units of the finally derived subnetwork model is determined according to the model performance.
[0035] Step 1 is implemented as follows:
[0036] (1) Determine the search space
[0037] First, we determine the search space required for neural architecture search, which is composed of a series of commonly used and advanced convolution operations in deep neural networks, including the following eight operations: depth separable convolution with a kernel size of 3 (Sep_conv_3), depth separable convolution with a kernel size of 5 (Sep_conv_5), dilated convolution with a kernel size of 3 (Dil_conv_3), dilated convolution with a kernel size of 5 (Dil_conv_5), average pooling (Avg_pool), maximum pooling (Max_pool), skip_connection, and none operation. The final neural network architecture is composed of the above operations, which depends on the selection of operations during the architecture search process.
[0038] We use a cell-based search method, that is, we construct a cell structure using the above operations, and stack these cell structures to form a complete neural network. Each cell structure has two preprocessing nodes and four internal nodes, and there is an edge between the nodes. Whether the edge between the nodes is retained and the operation on the edge is to be determined, that is, to be searched.
[0039] (2) Construct a super network
[0040] After determining the search space, we will construct a super network (supernet) according to the search space. The detailed structure of the super network is composed of a feature extraction network (backbone) composed of two stem layers and eight cell structures, and a detection head composed of ordinary convolution with a relu activation function. There are two types of cell structures: one is a normal cell (normal_cell), and the feature map normally passes through the normal cell, that is, the input and output feature map sizes and channel numbers of the cell do not change, which means that the feature dimension of the feature map does not change. The other is a reduction cell (reduction_cell), which reduces the size of the input data feature map by half, while the channel number is doubled. In the super network, the 3rd cell and the 6th cell are reduction cells.
[0041] The internal structure of each cell is described as follows: the cell is internally composed of 2 preprocessing nodes and 4 intermediate nodes, the input data of each preprocessing node is the output of the previous two cells or stems, and the input of each intermediate node is from the previous two intermediate nodes or preprocessing nodes. At the same time, all nodes are fully connected, that is, there is a directed edge between each two nodes, from low order to high order, and the edge contains all operations in the search space. After the internal structure is determined, the operations on the edge are assigned an operation weight, and the sum of the weights is 1. The input edge of each intermediate node is also assigned an edge weight, and the sum of the weights is 1. Finally, the two input edges of each intermediate node and the corresponding operation types on the input edges need to be determined.
[0042] The internal structures of normal cells and reduced cells are consistent, and the difference lies in the change of operation channels and the step of the internal edges.
[0043] The optimization update of the super network includes two steps:
[0044] I. Forward propagation
[0045] After the input data of the neural network, that is, a SAR image or a batch of SAR images, passes through all stems and cells, the output feature map enters the detection head. After calculation in the detection head, the features in the feature map are converted into the center point coordinates and offsets of all ship target detection boxes detected by the model under the current image, as well as the confidence of the detection box.
[0046] The output result of the detection head is compared with the true value of the picture, and the accuracy loss of the target detection of the current super network is calculated according to the specified loss function. At the same time, the sum of the weighted theoretical calculation amount of the current super network is calculated according to the weight distribution on the edge and the weight distribution between the nodes. The theoretical calculation amount of the super network is taken logarithm, so that the accuracy loss and the theoretical calculation amount of the super network are kept in the same order of magnitude. Finally, the accuracy loss and the theoretical calculation amount of the super network are added according to the set weight term to obtain the loss value of this round of training. The purpose of adding the theoretical calculation amount of the super network is to make the optimization direction of the super network also appropriately biased towards the operation with smaller calculation amount, while the accuracy loss can ensure that the optimization direction of the final super network will not ignore the target detection ability of the network.
[0047] II. Back propagation
[0048] The update of the super network is a two-step update. Firstly, the loss is back-propagated, and the network weights (all the parameters of the operations themselves) of the current super network are fixed, and the architecture parameters (the weight distribution on the edges mentioned above and the weight distribution between the edges of the nodes) of the super network are updated. After the first step of updating is completed, the loss value of the super network is recalculated according to the new architecture parameters and the same input data, the loss value is back-propagated, the architecture parameters of the super network are fixed, and the network weights of the super network are updated.
[0049] In step 2, the implementation process is as follows:
[0050] In the process of super network update, we introduce a pruning technique to explore the channel masking parameter K and the number of neural network model stacking units L:
[0051] (1) Channel pruning
[0052] In the optimization process of the super network, we set an initial channel masking parameter K, which serves as a function when the feature map passes through a candidate operation, and the original number of channels will be reduced to 1 / K of the original number. Initially, K is 1, at this time all candidate operations in the super network are full-channel calculation, and as the super network is optimized, the F1 detection accuracy on the training set will gradually increase, and when it exceeds the F1 on the validation set at a certain number of rounds, it is considered that the super network has overfitting problem, that is, the neural network model size is too complex for the target task. When the difference between the F1 on the training set and the F1 on the validation set exceeds the set threshold, the channel pruning mechanism is triggered, and K is doubled, representing that the number of channels participating in the calculation of the candidate operation of the super network will be halved. After the number of channels is halved, the super network continues to optimize from the current model state until the next overfitting occurs.
[0053] (2) Model pruning
[0054] After the channel pruning is completed, that is, K reaches the preset maximum threshold, the size of the model can be further reduced by reducing the number of stacking layers of the super network.
[0055] In step 3, the implementation process is as follows:
[0056] Repeat the supernet training process described above until the set number of training epochs is completed. This is called architecture search completion. At this point, a neural network architecture, called a subnet, is derived based on the current architecture parameters. The derivation rules are as follows: Multiply the weight of each edge by the weight of the operation on that edge. Then, based on this new weight distribution, select the two edges with the largest new weights for the input edges of each intermediate node (the operations on those edges also have the largest weights). In addition to the subnet structure, two other parameters are also determined after the search: the channel masking parameter k and the number of network layers L. During the subnet training, the number of channels for all operations will be determined based on k, and the number of subnet layers will be determined based on L.
[0057] Step 4 is implemented as follows:
[0058] (1) Constructing a subnet model
[0059] The derived subnet structure is mainly used to describe the internal structure of the two types of cells, including the selection of input edges of all intermediate nodes and the selection of operations on all input edges. We will build a completely new subnet based on this subnet structure for subnet training. The trained model can then perform target detection tasks on SAR images.
[0060] The complete subnet model consists of two stem layers, L cells, and a detection head, where the L / 3rd and 2L / 3rd cells are reduction cells. The internal structure of these two types of cells is derived during the architecture derivation stage.
[0061] (2) Subnet Training and Target Detection
[0062] After the subnet model is built, it is trained thoroughly. The forward propagation process of the subnet is the same as that of the supernet, except that the number of cells is different. However, since the internal structure of the subnet is already determined, there is no need to set the architecture parameters of the supernet. At the same time, since the subnet architecture is determined, after the subnet forward propagation is completed, the calculated subnet loss only accounts for the accuracy loss of object detection, and there is no need to account for the computational cost of the subnet. This is because the training of the subnet cannot change the internal structure of the subnet cells, and only focuses on improving the object detection accuracy of the current subnet.
[0063] After the subnetwork training is completed, we input an unlabeled SAR image containing a ship target into the subnetwork model, extract features through subnetwork forward propagation, and detect the detection frame after the features are extracted and converted into a certain number of default detection frames. The frame may or may not contain a ship target, which depends on the detection effect of the model itself. First, the detection frame with a confidence lower than the confidence threshold is filtered, and the confidence represents the probability or confidence that the subnetwork model considers that the current detection frame contains a target. Then, maximum suppression is performed to select the detection frame that the model considers most likely to contain different ship targets. Finally, the detection frame is drawn on the SAR image containing the ship target to visualize the detection result.
[0064] Advantages
[0065] (1) For the task of SAR image ship target detection, an efficient neural network model can be automatically designed, which greatly improves the detection efficiency of the neural network model while meeting the detection accuracy requirements.
[0066] (2) From the perspective of architecture search, not only the unit structure of the final subnetwork model is determined, but also the number of channels of the subnetwork and the number of unit stacks of the subnetwork are specified. This not only alleviates the overfitting problem in super network search, but also greatly reduces the performance difference between the super network and the subnetwork in the architecture search technology.
[0067] (3) From the perspective of architecture design, through automatic differentiable architecture search, the invention greatly saves the parameter tuning cost of neural network designers and quickly determines a specific neural network architecture that meets the task requirements on a completely new task. BRIEF DESCRIPTION OF DRAWINGS
[0068] Figure 1 The framework structure diagram of the efficient neural network search and training method based on the pruning technology illustrates that the framework is composed of neural architecture search and subnetwork training, and the detailed work flow of each part.
[0069] Figure 2 The super network architecture details are shown, and the initial number of channels is 16.
[0070] Figure 3-1 The internal node distribution of the unit in the super network is shown.
[0071] Figure 3-2 The connection between the two internal nodes of the unit in the super network and the candidate operation are shown.
[0072] Figure 4It demonstrates the derived subnet architecture and the parameters that ultimately construct the complete subnet model architecture.
[0073] Figure 5-1 This is an instance of the internal structure of a normal unit derived through a search of differentiable neural architectures.
[0074] Figure 5-2 This is an instance of the reduced-unit internal structure derived through differentiable neural architecture search. Detailed Implementation
[0075] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0076] Example 1: This invention is an efficient neural network search and training method based on pruning techniques, mainly including neural architecture search, supernet optimization, model pruning, channel pruning, and training subnets, as shown in Figure 1. The specific steps are as follows:
[0077] Step 1: Construct a supernet model and optimize and update the supernet under the guidance of a loss function that includes the theoretical computational cost of the model through differentiable architecture search, to determine the optimal neural network unit structure.
[0078] First, determine the search space for neural architecture search, including the types of operators such as... Figure 3-2 As shown, there are eight specific operations: depthwise separable convolution with a kernel size of 3 (Sep_conv_3), depthwise separable convolution with a kernel size of 5 (Sep_conv_5), dilated convolution with a kernel size of 3 (Dil_conv_3), dilated convolution with a kernel size of 5 (Dil_conv_5), average pooling (Avg_pool), max pooling (Max_pool), skip connection operation, and zeroing out the feature map (none).
[0079] Based on the defined search space, a supernetwork is constructed, whose macrostructure is as follows: Figure 2 As shown, the initial number of channels in the supernet is set to 16. The number of output channels of the stem is three times the initial number, while the number of output channels of the first normal unit is four times the initial number, i.e., 64. The initial number of channels directly determines that the number of channels for operations on each connection edge within the unit is 16. The output of each unit is formed by splicing four intermediate nodes, so the output channel number of the first unit is 64. In addition, the channel masking parameter K is initially set to 1, meaning that each operation is calculated using all channels at this time, and channel pruning has not yet been performed. The number of stacked units L is initially set to 8, and L will gradually decrease to an appropriate number during the model pruning process.
[0080] For the unit structure of the super network, as shown in Figure 3-1 The inputs of the two preprocessing nodes 0, 1 are respectively from the outputs of the previous cell and the previous previous cell. In particular, the inputs of the two preprocessing nodes of the first cell are respectively from the outputs of stem0 and stem1. After the outputs of the first two cells pass through the preprocessing nodes 0, 1, the intermediate results will be output to four intermediate nodes 2, 3, 4, 5. Each intermediate node will also receive the intermediate results of all nodes with a smaller serial number at the same time. For example, in addition to receiving the intermediate results of the preprocessing nodes 0, 1, the intermediate node 4 also needs to receive the intermediate results of the intermediate nodes 2, 3. At the same time, edges are formed between the preprocessing nodes 0, 1 and the intermediate nodes 2, 3, 4, 5 and between the intermediate nodes, as shown in Figure 3-2 The edge contains operations in all eight search spaces. The neural architecture search is to select the operation on the edge that is most suitable for the current target task. Therefore, in the super network, the eight operations will be assigned a weight, and the sum of the weights of the eight operations is 1. When the intermediate result of the intermediate node 1 is output to the intermediate node 2, the intermediate result needs to pass through the calculation of all eight operations through the edge between the two nodes. The calculation results of the eight operations are weighted and summed. This weighted sum also needs to be weighted and summed with the calculation results of the input edges of the other intermediate node 2 to form the intermediate result of the intermediate node 2. Here, all input edges of an intermediate node need to be left only two edges according to the search target setting. Therefore, when the super network is initialized, all input edges of each intermediate node will also be assigned a weight, and the sum of the input edge weights of each intermediate node is 1. The output of a cell is to splice the intermediate results of all intermediate nodes.
[0081] After the super network is constructed, optimization and update are performed on the SAR image dataset. During the super network training process, the batch stochastic gradient descent optimization method with momentum is adopted. The learning rate is decayed according to the training round, and the initial value is 1. The decay is performed by the cosine annealing algorithm. The preset super network training is 50 rounds, which completes a complete super network training. During each round of super network training, after each batch of input pictures is calculated by the super network, a tensor is obtained as the classification basis. The tensor is compared with the label file of the input picture of the batch. According to the cross-entropy loss of the calculation accuracy, the theoretical calculation amount weighted sum of the current super network is also obtained according to the current super network edge weight and operation weight statistics. The above two results are weighted and summed to obtain the hybrid loss, and the hybrid loss is back propagated to update all weight parameters.
[0082] Step 2: The channel pruning technique is used to explore the optimal channel mask parameter K during the search process, and the model pruning technique is used to explore the optimal number of neural network model units L. During the hypernet training process, when the hypernet overfits the SAR image dataset, it is considered that the model size is over-fitted at this time, and channel pruning needs to be performed on the hypernet, that is, K is doubled, and the number of channels participating in the calculation of the hypernet model is reduced to half of the original. When the channel pruning parameter K reaches the preset threshold, model pruning is performed, L is reduced according to the reduction rule, and training is performed.
[0083] After the hypernet is trained and optimized for 50 rounds, the final subnet unit structure template is derived according to the edge weight and operation weight of the hypernet, and the current channel mask parameter K and the number of model stacking units L.
[0084] Step 3: According to the neural network architecture template derived by the hypernet, the channel mask parameter and the number of model stacking units, the complete subnet neural network model is constructed, and is trained for ship target detection.
[0085] In the step, a unit structure instance is used to perform detailed description of the step, and in the actual application of the invention, the derived unit structure template and the two parameters are automatically and randomly obtained according to the actual task requirements, and are not exactly the same as the present instance.
[0086] First, the complete subnet neural network model is constructed, as shown in Figure 4 The derived unit structure is stacked for 7 layers, and when K is 4, the initial channel number is set to one quarter of the initial channel number of the hypernet, that is, 4, and the channel number of the corresponding stem part is 12. The channel number of the internal node input edge of the first cell is 4, and the output channel is 16. The internal structures of the two kinds of units are shown in Figure 5-1 and Figure 5-2 .
[0087] After the subnet model is constructed, complete training needs to be performed on the SAR image dataset. The batch random gradient descent optimizer with momentum is used in the training process. In each training round, 256 pictures are taken as a batch to input the training set into the subnet for optimization and update. The training is performed for a total of 100 rounds. The initial learning rate of the optimizer is set to 1, and the cosine annealing algorithm is used to decay the learning rate.
[0088] After the training rounds are completed, the SAR image test set is input into the subnet to obtain the detection accuracy, measure the detection efficiency, that is, the number of pictures detected per second, and generate a picture labeled with the ship detection target.
[0089] It should be noted that the above examples are only the preferred embodiments of the present application, and are not used to limit the protection scope of the present application, and equivalent substitutions or replacements made on the basis of the above technical solutions all belong to the protection scope of the present application.
Claims
1. An efficient neural network search and training method based on pruning techniques, characterized in that: The method comprises the following steps: Step 1: determining the optimal neural network unit structure by optimizing and updating the super network under the guidance of a loss function containing theoretical calculation amount of the model, specifically as follows, after the super network is constructed, optimization and updating are performed on the SAR image data set, After the super network is constructed, optimization and updating are performed on the SAR image data set, a batch random gradient descent optimization method with momentum is adopted in the super network training process, the learning rate is decayed according to the training round, the initial value is 1, the decay is performed by using the cosine annealing algorithm, and one complete super network training is completed after 50 preset training rounds, in the process of each round of super network training, after the input picture of each batch is calculated through the super network, a tensor is obtained as the classification basis, the tensor is compared with the label file of the input picture of the batch, the cross-entropy loss of the calculation accuracy is obtained, and the weighted sum of the theoretical calculation amount of the current super network is obtained according to the current super network edge weight and operation weight, the mixed loss is obtained by weighting the above two results, and the mixed loss is back propagated to update all weight parameters, Step 2: exploring the optimal channel shielding parameter by using the channel pruning technology and exploring the optimal number of neural network model unit stacks during the search process; Step 2 is implemented as follows: in the process of super network updating, the pruning technology is introduced to explore the channel shielding parameter K and the number of neural network model stack units L: (1) Channel pruning In the optimization process of the super network, an initial channel shielding parameter K is set, which functions as reducing the original channel number to 1 / K when the feature map passes through a candidate operation, and the initial K is 1, at this time, all candidate operations in the super network are full-channel calculation, and as the super network is optimized, the F1 of the detection accuracy on the training set will gradually increase, and when the F1 on the training set exceeds the F1 on the validation set at a certain round, it is considered that the super network has overfitting problem, that is, the neural network model size is too complex for the target task, when the difference between the F1 on the training set and the F1 on the validation set exceeds the set threshold, the channel pruning mechanism is triggered, K is doubled, and the number of channels participating in the calculation of the candidate operation of the super network is halved, after the number of channels is halved, the super network continues to optimize from the current model state until the next overfitting occurs, (2) Model pruning After the channel pruning is completed, that is, when K reaches the preset maximum threshold, the model size is further reduced by reducing the number of stack layers of the super network, In step 2, K is set and determined automatically during the architecture search process: The symbols are explained as follows: O represents the set of candidate operations, Step 3: after the neural architecture search process is completed, that is, the neural network unit structure is determined, and the number of model unit stacks and the channel shielding parameter are clear, a subnetwork is derived according to the current state of the super network; This represents the weight of the candidate operation o. input data representing input data participating in neural network model computation, input data not participating in the calculation, x i represents the complete input data, S i,j represents a channel mask matrix, composed of 0, 1, whose size dimension corresponds to the input data x i , S is determined by K i,j 1 / K part of 1, the other part is 0, Step 4: According to the derived neural network architecture, channel mask parameters and neural network model unit stacking number, build a complete neural network model and train it for ship target detection.
2. The pruning technique based efficient neural network search and training method according to claim 1, characterized in that: In step 1, the theoretical calculation amount of the neural network model is included in the loss function of the differentiable architecture search: Loss = acc_ratio x Loss_CE + ops_ratio x log(Ops) The symbols are explained as follows: · acc_ratio represents the weight term of the detection accuracy loss; · Loss_CE represents the accuracy cross-entropy loss of the current neural network model, which is obtained by comparing the prediction result of the input image through the current model with the image true value; · ops_ratio represents the weight of the model theoretical calculation amount, and the two weight terms balance the accuracy and efficiency of the finally derived model of neural architecture search; · Ops represents the sum of the weighted theoretical calculation amount of the current neural network model according to the current architecture parameters. 3.The pruning technique based efficient neural network search and training method of claim 1, wherein: In step 2, the stacking unit number L of the model is gradually reduced, and the stacking unit number of the finally derived sub-network model is determined according to the model performance.