Network architecture search method, terminal equipment and computer readable storage medium

By initializing the population, training, verifying and updating individuals under limited computing resources, it solves the problem that neural network architecture search based on evolutionary algorithms cannot explore the best architecture, and realizes the ability to discover the best neural network architecture under limited resources. , to meet practical application needs.

CN118780337APending Publication Date: 2024-10-15YUNNAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410753428.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Neural network architecture search based on evolutionary algorithms cannot effectively explore when computing resources are insufficient, resulting in the inability to discover the optimal neural network architecture and fail to meet actual application needs or exert potential performance.

Method used

By initializing the population with a set size, training samples are used to train and verify individuals, perform crossover operations and mutation operations, and update the target individuals according to the fitness value. If the number of iterations is less than the maximum set number, training will continue. If it is equal to the maximum number of iterations, then Output target individuals to effectively explore the optimal neural network architecture under limited computing resources.

Benefits of technology

Even with limited computing resources, it can still effectively explore and discover the best neural network architecture to meet actual application needs and maximize potential performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780337A_ABST
    Figure CN118780337A_ABST
Patent Text Reader

Abstract

The invention discloses a network architecture search method, which comprises the following steps of: initializing a population with a set size based on a set search space; training individuals in the population by adopting a training sample; verifying the individual by adopting a verification set to obtain an adaptive value of the individual; performing crossover operation and / or mutation operation on the individuals based on the adaptive values of the individuals to obtain offspring individuals; verifying the offspring individuals by adopting the verification set to obtain adaptive values of the offspring individuals; determining a target individual from the individuals in the population and the offspring individuals according to the adaptive value; if the number of iterations of the population is smaller than the maximum set number of iterations, updating the target individual into the population, and continuing to train the population; and if the number of iterations of the population is equal to the maximum set number of iterations, outputting the population formed by the target individuals. And under the condition that computing resources are limited, exploration is still effectively carried out to find the optimal neural network architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network architecture search technology, and in particular to a network architecture search method, terminal equipment and computer-readable storage medium. Background Art

[0002] At present, with the rapid development of artificial intelligence and automation technology, Neural Architecture Search (NAS) based on evolutionary algorithms has attracted widespread attention in the field of deep learning. Especially in the fields of complex data processing and high-performance computing, effective network architecture design can significantly improve computing efficiency and reduce energy consumption. In recent years, NAS based on evolutionary algorithms has received widespread attention and application due to its high efficiency. Its core is to simulate the biological evolution process, and through natural selection and genetic variation mechanisms, the network architecture design is assigned to an independent and adaptive search process, thereby improving the overall search efficiency. However, NAS based on evolutionary algorithms requires a lot of neural network training and evaluation to find the best architecture, which has very high requirements for computing resources. If the computing resources are insufficient, NAS based on evolutionary algorithms cannot be effectively explored, and thus cannot find the best neural network architecture, which will result in the obtained neural network architecture failing to meet the needs of practical applications or failing to exert its potential performance.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The embodiments of the present invention provide a network architecture search method, a terminal device, and a computer-readable storage medium, aiming to solve the technical problem that when computing resources are insufficient, the NAS based on the evolutionary algorithm cannot effectively explore and thus cannot find the optimal neural network architecture, which will result in the obtained neural network architecture being unable to meet the needs of practical applications or being unable to exert its potential performance.

[0005] To achieve the above object, an embodiment of the present invention provides a method for searching a network architecture, and the method for searching a network architecture includes the following steps:

[0006] Initializing a population of a set size based on a set search space, where the set size refers to the number of individuals in the population;

[0007] Using training samples to train individuals in the population;

[0008] Using a validation set to validate the individual to obtain a fitness value of the individual;

[0009] Performing a crossover operation and / or a mutation operation on the individual based on the fitness value of the individual to obtain an offspring individual;

[0010] Using the verification set to verify the offspring individual to obtain the fitness value of the offspring individual;

[0011] Determine a target individual from the individuals in the population and the offspring individuals according to the fitness value;

[0012] If the number of iterations of the population is less than the maximum set number of iterations, the target individual is updated to the population, and the step of training the individuals in the population using the training samples is continued;

[0013] If the number of iterations of the population is equal to the maximum set number of iterations, the population consisting of the target individuals is output.

[0014] Optionally, the search space includes at least the following operations:

[0015] Identity mapping;

[0016] First depthwise separable convolution;

[0017] The second depth-wise separable convolution;

[0018] First dilated convolution;

[0019] Second dilated convolution;

[0020] Max pooling;

[0021] Average pooling;

[0022] Attention module;

[0023] Among them, the kernel size of the first depthwise separable convolution is 3, the kernel size of the second depthwise separable convolution is 5, the kernel size of the first atrous convolution is 3, the kernel size of the second atrous convolution is 5, the kernel size of the maximum pooling is 3, the kernel size of the average pooling is 3, and the kernel size of the attention module is 3.

[0024] Optionally, the encoding structure of the individual includes two input nodes and two operation nodes, the input node represents the input source of the individual, and the operation node represents the operation corresponding to the input node.

[0025] Optionally, the step of using training samples to train individuals in the population includes:

[0026] Randomly selecting a first preset number of training samples from a preset training set, where the first preset number is less than the total number of the preset training set;

[0027] Randomly selecting a second preset number of individuals from the population, and using the second preset number of individuals as candidate architectures, wherein the second preset number is smaller than the set size of the population;

[0028] Decoding a second predetermined number of the individuals into corresponding neural network architectures;

[0029] The neural network architecture is trained using the training samples, and the model parameters of the neural network architecture are determined and updated according to the set model parameter update formula;

[0030] The setting model parameter update formula is:

[0031] W a =W a -α·▽ Wa L(W a ,B)

[0032] Among them, α is the learning rate, L is the loss function, ▽ Wa L is the loss function with respect to the model parameters W a gradient.

[0033] Optionally, the step of performing a crossover operation and / or a mutation operation on the individual based on the fitness value of the individual to obtain the offspring individual includes:

[0034] According to the fitness values ​​of the individuals, two individuals are selected from the individuals as parents, and the parents can be described as a first parent and a second parent respectively;

[0035] Performing a crossover operation and / or a mutation operation on the first parent and the second parent to obtain the offspring individual;

[0036] Among them, the crossover operation is to exchange the genes in the preset position or preset region in the first parent and the parameters carried by the genes with the genes in the preset position or the preset region in the second parent and the parameters carried by the genes; the mutation operation is to modify the input node in the encoding corresponding to the first parent, modify the input node in the encoding corresponding to the second parent, and / or modify the operation node in the encoding corresponding to the first parent, modify the operation node in the encoding corresponding to the second parent.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a network architecture search program stored in the memory and executable on the processor, and the network architecture search program, when executed by the processor, implements the steps of the network architecture search method as described above.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a network architecture search program is stored, and when the network architecture search program is executed by a processor, the steps of the network architecture search method described above are implemented.

[0039] The present invention proposes a network architecture search method, terminal device and computer-readable storage medium, based on a set search space, initializes a population of a set size, uses training samples to train individuals in the population, uses a verification set to verify individuals, obtains individual fitness values, performs crossover operations and / or mutation operations on individuals based on their fitness values, obtains offspring individuals, and then continues to verify offspring individuals using a verification set to obtain offspring individual fitness values, and then determines target individuals from individuals in the population and offspring individuals based on the fitness values, if the number of iterations of the population is less than the maximum set number of iterations, updates the target individual to the population, continues to train the population, and if the number of iterations of the population is equal to the maximum set number of iterations, outputs the population composed of the target individuals. This achieves effective exploration and discovery of the best neural network architecture under limited computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flowchart of an embodiment of a method for searching a network architecture of the present invention;

[0041] Figure 2 A schematic diagram of a node structure of a network architecture search method according to the present invention;

[0042] Figure 3 A schematic diagram of the construction of a neural network architecture involved in the present invention;

[0043] Figure 4 A schematic diagram of a channel attention module according to the present invention;

[0044] Figure 5 A schematic diagram of a variation operation of a search method for a network architecture according to the present invention;

[0045] Figure 6 A search schematic diagram of a search method for a network architecture according to the present invention;

[0046] Figure 7 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0049] At present, with the rapid development of artificial intelligence and automation technology, Neural Architecture Search (NAS) based on evolutionary algorithms has attracted widespread attention in the field of deep learning. Especially in the fields of complex data processing and high-performance computing, effective network architecture design can significantly improve computing efficiency and reduce energy consumption. In recent years, NAS based on evolutionary algorithms has received widespread attention and application due to its high efficiency. Its core is to simulate the biological evolution process, and through natural selection and genetic variation mechanisms, the network architecture design is assigned to an independent and adaptive search process, thereby improving the overall search efficiency. However, NAS based on evolutionary algorithms requires a lot of neural network training and evaluation to find the best architecture, which has very high requirements for computing resources. If the computing resources are insufficient, NAS based on evolutionary algorithms cannot be effectively explored, and thus cannot find the best neural network architecture, which will result in the obtained neural network architecture failing to meet the needs of practical applications or failing to exert its potential performance.

[0050] In order to solve the above defects in the related art, the present invention proposes a network architecture search method, and its main solution steps include the following:

[0051] Based on the set search space, a population of set size is initialized, individuals in the population are trained using training samples, individuals are verified using validation sets, and individual fitness values ​​are obtained. Based on the individual fitness values, crossover and / or mutation operations are performed on individuals to obtain offspring individuals, and then validation sets are used to verify offspring individuals to obtain offspring fitness values. Then, target individuals are determined from individuals in the population and offspring individuals based on fitness values. If the number of iterations of the population is less than the maximum number of iterations set, the target individual is updated to the population, and the population is continued to be trained. If the number of iterations of the population is equal to the maximum number of iterations set, the population composed of target individuals is output. This achieves effective exploration and discovery of the best neural network architecture under limited computing resources.

[0052] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0053] Reference Figure 1In one embodiment of the network architecture search method of the present invention, the network architecture search method comprises the following steps:

[0054] Step S10: Initializing a population of a set size based on a set search space, where the set size refers to the number of individuals in the population;

[0055] In this embodiment, the search space refers to the set of all possible network structures in the search of the neural network architecture. The set size refers to the number of individuals in the population. Individuals can be generated randomly in the search space, or individuals can be generated in the search space according to a pre-set generation rule, and the generated individuals are combined to form the initialization population.

[0056] Optionally, the set search space includes at least the following operations: identity mapping, first depth separable convolution, second depth separable convolution, first dilated convolution, second dilated convolution, maximum pooling, average pooling, and attention module. Among them, the kernel size of the first depth separable convolution is 3, the kernel size of the second depth separable convolution is 5, the kernel size of the first dilated convolution is 3, the kernel size of the second dilated convolution is 5, the kernel size of the maximum pooling is 3, the kernel size of the average pooling is 3, and the kernel size of the attention module is 3.

[0057] Optionally, the encoding structure of the individual adopts a double-layer encoding structure, including two input nodes and two operation nodes, each node consisting of four integer values. The first layer is the input node representing the input source of the individual, and the second layer is the operation node representing the operation corresponding to the input node.

[0058] Furthermore, the present invention pre-sets the encoding of each operation mapping in the search space. The input node can be directly encoded in the node order so as to encode the individual operation nodes. The encoding of each operation mapping in the search space of the present invention can refer to Table 1.

[0059] Operation Type Kernel size Abbreviation coding Identity Mapping - Identity 1 First Depthwise Separable Convolution 3 DW3 2 Second depthwise separable convolution 5 DW5 3 The first dilated convolution 3 DC3 4 Second dilated convolution 5 DC5 5 Max Pooling 3 MAX 6 Average Pooling 3 AVG 7 Attention Module 3 IECA 8

[0060] To facilitate understanding of the individual encoding method of the present invention, an example is given below:

[0061] Reference Figure 2 , Figure 2The present invention is a schematic diagram of the node structure of the search method of the network architecture. Assume that the input nodes of node i (node[i]) are node 1 and node 2. Therefore, it represents that node i receives data from node 1 and node 2. Therefore, the input node of node i is represented as (1, 2). Node i processes the data x1 from node 1 using DW3 and the data x2 from node 2 using DC3. According to Table 1, the encoding of the mapping of DW3 is 2, and the encoding of the mapping of DC3 is 4, so the encoding of node i is ((1, 2), (2, 4)). Among them, (1, 2) indicates that the input nodes of node i are node 1 and node 2. (2, 4) indicates that the operation of node i on input node 1 is 2, and the operation of node i on input node 2 is 4.

[0062] Optionally, refer to Figure 3 , Figure 3 The figure is a schematic diagram of the construction of the neural network architecture involved in the present invention. A block structure can be formed by stacking multiple nodes, and then a cell structure is formed by stacking multiple block structures, and finally a final neural network architecture is formed by stacking multiple cells.

[0063] Optionally, in order to reduce the parameters and computing requirements of the network, the present invention also integrates a channel attention mechanism and innovatively optimizes and improves it.

[0064] Specifically, the SE module (Squeeze-and-Excitation), as a pioneering work of the channel attention mechanism, improves the model's ability to capture the dependencies between channels through compression (Squeeze) and excitation (Excitation). The traditional compression step obtains the global information of each channel through global average pooling, and the excitation step learns the weights between channels through a fully connected layer. However, the use of global average pooling will lead to the loss of local information and the degradation of potential performance, and the fully connected layer is inefficient in obtaining dependencies and has a large amount of computation. Therefore, the present invention uses the hybrid hole convolution design principle (HDC) to compress the feature map, and uses 1×1 convolution to capture the dependencies between channels. Refer to Figure 4 , Figure 4 This is a schematic diagram of the channel attention module involved in the present invention. First, the feature map is downsampled by mixed dilated convolution, the obtained feature map is passed through the pooling layer to obtain a 1×1×C feature vector, the feature vector is processed by 1D convolution, the dependency between channels is learned, and finally the learned weights are applied to the original feature map to weight each channel.

[0065] The expression of the design principle of hybrid dilated convolution is:

[0066] M i =max[M i+1-2r i ,M i+1 -2(M i+1 -r i ),r i ]

[0067] The expression of 1D convolution is:

[0068] s=σ(Conv1D(z))

[0069] where r i is the expansion rate of the i-th layer, M i is the maximum expansion rate of the i-th layer, σ is the Sigmoid activation function, and Conv1D represents a 1D convolution operation.

[0070] Step S20: using training samples to train individuals in the population;

[0071] In this embodiment, a first preset number of training samples is randomly selected from a preset training set, the first preset number is less than the total number of the preset training set, a second preset number of individuals is randomly selected from the population, the second preset number of individuals are used as candidate architectures, the second preset number is less than the set size of the population, and then the second preset number of individuals are decoded into corresponding neural network architectures, the neural network architecture is trained using the training samples, and the model parameters of the neural network architecture are determined and updated according to the set model parameter update formula, so that a small batch of training samples can be used to train individuals until convergence, thereby improving the training rate of individuals. This enables effective exploration and discovery of the best neural network architecture under limited computing resources.

[0072] Furthermore, the parameter update formula is:

[0073] W a =W a -α·▽ Wa L(W a ,B)

[0074] Among them, α is the learning rate, L is the loss function, ▽ Wa L is the loss function with respect to the model parameters W a gradient.

[0075] Optionally, the random selection may be specifically a random uniform selection, which is not specifically limited in this embodiment.

[0076] Step S30: using a verification set to verify the individual to obtain the fitness value of the individual;

[0077] In this embodiment, it can be understood that the fitness value is calculated by the objective function of the problem. The specific calculation process can be referred to the prior art and will not be described in detail here.

[0078] Step S40: performing a crossover operation and / or a mutation operation on the individual based on the fitness value of the individual to obtain an offspring individual;

[0079] In this embodiment, two individuals are selected from the individuals as parents according to the fitness values ​​of the individuals. The parents can be described as the first parent and the second parent respectively. Then, a crossover operation and / or a mutation operation is performed on the first parent and the second parent to obtain offspring individuals.

[0080] It should be noted that the present invention needs to continuously perform crossover and / or mutation operations on two parents until offspring individuals of a set size are obtained.

[0081] Among them, the crossover operation is to exchange the genes and the parameters carried by the genes in the preset position or preset region of the first parent with the genes and the parameters carried by the genes in the preset position or preset region of the second parent. The mutation operation is to modify the input node in the code corresponding to the first parent, modify the input node in the code corresponding to the second parent, and / or modify the operation node in the code corresponding to the first parent, modify the operation node in the code corresponding to the second parent.

[0082] Among them, the input node that modifies the parent can be called a source mutation, and the operation node that modifies the parent can be called an operation mutation.

[0083] For example, refer to Figure 5 , Figure 5 The diagram is a schematic diagram of the mutation operation of the search method of the network architecture involved in the present invention. The first figure is a schematic diagram of the source mutation. That is, the input node of the parent is changed from 4 to 3, and then the operation source node in the neural network architecture corresponding to Avg3×3 is changed from node 4 to node 3 (the part marked by the red dotted line), but the parameters corresponding to Avg3×3 remain unchanged. The second figure is a schematic diagram of the operation mutation. That is, the operation in the operation node in the encoding corresponding to the parent is changed from 7 to 6, and then Avg3×3 in the related neural network design is replaced by Max3×3 (the part marked by the red dotted line), and the corresponding parameters of the variant Max3×3 are randomly initialized.

[0084] Step S50: using the verification set to verify the offspring individual to obtain the fitness value of the offspring individual;

[0085] Step S60: determining a target individual from the individuals in the population and the offspring individuals according to the fitness value;

[0086] In this embodiment, after obtaining the offspring individuals, the offspring individuals are continuously verified using the verification set to obtain the fitness values ​​of the offspring individuals. Then, the target individuals with the best fitness values ​​are selected from the individuals in the currently trained population and the obtained offspring individuals. The number of target individuals is the set size.

[0087] Step S70: if the number of iterations of the population is less than the maximum set number of iterations, the target individual is updated to the population, and the step of training the individuals in the population using the training samples is continued;

[0088] Step S80: If the number of iterations of the population is equal to the maximum set number of iterations, the population composed of the target individuals is output.

[0089] In this embodiment, when the number of iterations of the population is less than the maximum set number of iterations, the target individual is updated to the population, so as to continue to train the population composed of the target individuals until the number of iterations of the population is greater than the maximum set number of iterations, and then the target individual with the best fitness value is output and decoded to obtain the corresponding neural network structure, which is the optimal neural network structure. Figure 6 , Figure 6 The present invention is a search schematic diagram of a network architecture search method.

[0090] In the technical solution provided in this embodiment, based on the set search space, a population of a set size is initialized, individuals in the population are trained using training samples, individuals are verified using a verification set, and the fitness value of the individual is obtained. Based on the fitness value of the individual, a crossover operation and / or a mutation operation is performed on the individual to obtain an offspring individual, and then the offspring individual is verified using a verification set to obtain the fitness value of the offspring individual, and then the target individual is determined from the individuals in the population and the offspring individuals according to the fitness value. If the number of iterations of the population is less than the maximum set number of iterations, the target individual is updated to the population, and the population is continued to be trained. If the number of iterations of the population is equal to the maximum set number of iterations, the population composed of the target individuals is output. This achieves that under limited computing resources, effective exploration and discovery of the optimal neural network architecture can still be achieved.

[0091] Furthermore, in this embodiment, a truncation selection strategy (Truncation Selection) is used as a population update step in the evolutionary algorithm. Specifically, the population update step (Selection) in the evolutionary algorithm is a key link in the evolutionary process, which determines which individuals will be retained to generate the next generation. The goal of the selection method is to give priority to individuals with better performance based on the fitness of the individuals (Fitness) while maintaining the diversity of the population. Unlike SUSE-NAS, SUSE-NAS-EQ uses a truncation selection algorithm to speed up the convergence of the algorithm instead of a sorting selection algorithm. The truncation selection strategy is a selection method used in an evolutionary algorithm, which sorts the population according to the fitness of the individuals, and then selects only a portion of the top-ranked individuals to enter the next generation. The main features of this method are that it is simple and direct, easy to implement, and can effectively maintain the proportion of high-fitness individuals in the population.

[0092] Exemplarily, the calculation steps of the truncation selection strategy are as follows:

[0093]

[0094] The above algorithm describes the truncated selection strategy used by SUSE-NAS-EQ. First, all individuals in the population are sorted according to their fitness, with individuals with high fitness at the front. Then, the parent population P is t and the offspring population Q t Take the union and select a certain proportion (T) of individuals in the front to form the next generation population. The operation of the truncation selection strategy can be described by the following expression:

[0095] S selected =S all ×T

[0096] Where S selected S represents the number of individuals selected to enter the next generation. all is the total number of individuals in the current population. T is the cutoff threshold, which determines the proportion of individuals selected from the current population. For example, if T = 0.5, it means that only the top 50% of individuals will be selected.

[0097] The advantage of the truncated selection strategy is that it is simple to operate and easy to implement, which makes it popular. Especially when the population size is large, it can quickly select individuals with high fitness. At the same time, by directly selecting the individuals with the highest fitness, it can ensure that the average fitness of the population increases rapidly.

[0098] Second embodiment

[0099] Based on the first embodiment, in this embodiment, in order to verify the effectiveness of the above solution, the CIFAR data set is used to compare the above SUSE-NAS-EQ algorithm model with other models, refer to the following table:

[0100]

[0101] Table 1

[0102] In order to comprehensively evaluate the performance of the algorithms proposed in this chapter, the researchers selected a variety of image classification algorithms from the field of deep learning as comparison objects. These algorithms are divided into three categories, aiming to cover the current wide application and latest progress of deep learning in image classification tasks.

[0103] (1) Artificially designed neural networks: This category includes a series of artificially designed network architectures that have shown excellent performance in multiple fields. Specifically, they include VGG, DenseNet, ResNet, SENet, and ShuffleNet.

[0104] (2) Reinforcement learning and gradient-based methods: This category uses reinforcement learning or gradient descent methods to automatically search for network architectures, including NAS V3, MetaQNN, ENAS, FDA, EBNAS-M, and Darts.

[0105] (3) Evolutionary algorithm-based methods: Algorithms that use evolutionary theory to iteratively improve network architectures, such as AmoebaNet-A, NSGA-Net, Large-scale evo, Hierarchical-EA, CARS, AE-CNN, SA-NAS, PSO-CNN, and MOPSO / D-Net.

[0106] As can be seen from Table 1, SUSE-NAS-EQ demonstrates its competitiveness against hand-designed expert network models in image classification tasks on the CIFAR10 and CIFAR100 datasets. Compared with VGG, the classification error rate on the CIFAR10 dataset is reduced by 3.78%, and on CIFAR100 by a staggering 17.25%, showing a significant performance improvement. Relative to ResNet, SUSE-NAS-EQ achieves 3.55% and 7.9% error rate reduction on the CIFAR10 and CIFAR100 datasets, respectively, demonstrating its effectiveness in handling complex image classification tasks. It is particularly noteworthy that the network architecture of SUSE-NAS-EQ has relatively few parameters, only 2.51M more than ResNet and 3.15M more than ShuffleNet, which is specially designed for lightweight networks, indicating that its design is more lightweight and helps reduce the consumption of computing resources. Overall, SUSE-NAS-EQ demonstrates competitive overall performance on the CIFAR10 and CIFAR100 datasets in comparison with hand-designed state-of-the-art CNN models, achieving not only excellent results in classification accuracy but also outstanding performance in model lightweighting, balancing efficiency and performance.

[0107] Reference Figure 7 , Figure 7 The figure is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0108] like Figure 7 As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), a mouse, etc., and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0109] Those skilled in the art will understand that Figure 7 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0110] like Figure 7 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a search program for a network architecture.

[0111] exist Figure 7 In the terminal shown, the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the processor 1001 can be used to call the search program of the network architecture stored in the memory 1005 and perform the following operations:

[0112] Initializing a population of a set size based on a set search space, where the set size refers to the number of individuals in the population;

[0113] Using training samples to train individuals in the population;

[0114] Using a validation set to validate the individual to obtain a fitness value of the individual;

[0115] Performing a crossover operation and / or a mutation operation on the individual based on the fitness value of the individual to obtain an offspring individual;

[0116] Using the verification set to verify the offspring individual to obtain the fitness value of the offspring individual;

[0117] Determine a target individual from the individuals in the population and the offspring individuals according to the fitness value;

[0118] If the number of iterations of the population is less than the maximum set number of iterations, the target individual is updated to the population, and the step of training the individuals in the population using the training samples is continued;

[0119] If the number of iterations of the population is equal to the maximum set number of iterations, the population consisting of the target individuals is output.

[0120] Further, the processor 1001 may call a search program for a network architecture stored in the memory 1005, and further perform the following operations:

[0121] Randomly selecting a first preset number of training samples from a preset training set, where the first preset number is less than the total number of the preset training set;

[0122] Randomly selecting a second preset number of individuals from the population, and using the second preset number of individuals as candidate architectures, wherein the second preset number is smaller than the set size of the population;

[0123] Decoding a second predetermined number of the individuals into corresponding neural network architectures;

[0124] The neural network architecture is trained using the training samples, and the model parameters of the neural network architecture are determined and updated according to the set model parameter update formula;

[0125] The setting model parameter update formula is:

[0126] W a =W a -α·▽ Wa L(W a ,B)

[0127] Among them, α is the learning rate, L is the loss function, ▽ Wa L is the loss function with respect to the model parameters W a gradient.

[0128] Further, the processor 1001 may call a search program for a network architecture stored in the memory 1005, and further perform the following operations:

[0129] According to the fitness values ​​of the individuals, two individuals are selected from the individuals as parents, and the parents can be described as a first parent and a second parent respectively;

[0130] Performing a crossover operation and / or a mutation operation on the first parent and the second parent to obtain the offspring individual;

[0131] Among them, the crossover operation is to exchange the genes in the preset position or preset region in the first parent and the parameters carried by the genes with the genes in the preset position or the preset region in the second parent and the parameters carried by the genes; the mutation operation is to modify the input node in the encoding corresponding to the first parent, modify the input node in the encoding corresponding to the second parent, and / or modify the operation node in the encoding corresponding to the first parent, modify the operation node in the encoding corresponding to the second parent.

[0132] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a network architecture search program stored in the memory and executable on the processor, and the network architecture search program, when executed by the processor, implements the steps of the network architecture search method as described above.

[0133] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a network architecture search program is stored, and when the network architecture search program is executed by a processor, the steps of the network architecture search method described above are implemented.

[0134] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0135] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer) to execute the methods described in each embodiment of the present invention.

[0137] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A network architecture search method, characterized in that: The network architecture search method includes: Initializing a population of a set size based on a set search space, where the set size refers to the number of individuals in the population; Using training samples to train individuals in the population; Using a validation set to validate the individual to obtain a fitness value of the individual; Performing a crossover operation and / or a mutation operation on the individual based on the fitness value of the individual to obtain an offspring individual; Using the verification set to verify the offspring individual to obtain the fitness value of the offspring individual; Determine a target individual from the individuals in the population and the offspring individuals according to the fitness value; If the number of iterations of the population is less than the maximum set number of iterations, the target individual is updated to the population, and the step of training the individuals in the population using the training samples is continued; If the number of iterations of the population is equal to the maximum set number of iterations, the population consisting of the target individuals is output.

2. The method according to claim 1, characterized in that The search space includes at least the following operations: Identity mapping; First depthwise separable convolution; The second depth-wise separable convolution; First dilated convolution; Second dilated convolution; Max pooling; Average pooling; Attention module; Among them, the kernel size of the first depthwise separable convolution is 3, the kernel size of the second depthwise separable convolution is 5, the kernel size of the first atrous convolution is 3, the kernel size of the second atrous convolution is 5, the kernel size of the maximum pooling is 3, the kernel size of the average pooling is 3, and the kernel size of the attention module is 3.

3. The method according to claim 1, characterized in that The encoding structure of the individual includes two input nodes and two operation nodes, the input node represents the input source of the individual, and the operation node represents the operation corresponding to the input node.

4. The method according to claim 1, characterized in that The step of using the training samples to train the individuals in the population includes: Randomly selecting a first preset number of training samples from a preset training set, where the first preset number is less than the total number of the preset training set; Randomly selecting a second preset number of individuals from the population, and using the second preset number of individuals as candidate architectures, wherein the second preset number is smaller than the set size of the population; Decoding a second predetermined number of the individuals into corresponding neural network architectures; The neural network architecture is trained using the training samples, and the model parameters of the neural network architecture are determined and updated according to the set model parameter update formula; The setting model parameter update formula is: W a =W a -α·▽ Wa L(W a ,B) Among them, α is the learning rate, L is the loss function, ▽ Wa L is the loss function with respect to the model parameters W a gradient.

5. The method according to claim 1, characterized in that The step of performing a crossover operation and / or a mutation operation on the individual based on the fitness value of the individual to obtain the offspring individual comprises: According to the fitness values ​​of the individuals, two individuals are selected from the individuals as parents, and the parents can be described as a first parent and a second parent respectively; Performing a crossover operation and / or a mutation operation on the first parent and the second parent to obtain the offspring individual; Among them, the crossover operation is to exchange the genes in the preset position or preset region in the first parent and the parameters carried by the genes with the genes in the preset position or the preset region in the second parent and the parameters carried by the genes; the mutation operation is to modify the input node in the encoding corresponding to the first parent, modify the input node in the encoding corresponding to the second parent, and / or modify the operation node in the encoding corresponding to the first parent, modify the operation node in the encoding corresponding to the second parent.

6. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a network architecture search program of the terminal device stored in the memory and executable on the processor. When the network architecture search program of the terminal device is executed by the processor, the steps of the network architecture search method as described in any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a search program for the network architecture of a terminal device, and when the search program for the network architecture of a terminal device is executed by a processor, the steps of the network architecture search method as described in any one of claims 1 to 5 are implemented.