A neural network structure searching method, device and equipment, and a storage medium

CN115545171BActive Publication Date: 2026-09-18JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211387018.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2026-09-18
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

[0005]本发明实施例提供了一种神经网络结构的搜索方法、装置、设备及存储介质,以解决传统的搜索空间范围过大的问题,降低神经网络搜索过程中的计算资源消耗量,提高神经网络结构的搜索效率

Benefits of technology

[0021]The technical solution of this invention generates a target search space by performing a structure growth operation on an initial neural network structure generated based on training attribute parameters. The target search space contains at least two first neural network structures. Based on the verification performance parameters corresponding to each first neural network structure in the target search space, each first neural network structure is screened to obtain a second neural network structure. Based on the second neural network structure and preset search conditions, a target neural network structure is determined. This generates the target search space during the neural network structure search process, solving the problem that traditional search spaces require pre-construction manually. Furthermore, since the target search space is generated based on the initial neural network structure, the range of the generated target search space is much smaller than that of traditional search spaces, thereby reducing the computational resource consumption during the neural network search process and improving the search efficiency of the neural network structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115545171B_ABST
    Figure CN115545171B_ABST
Patent Text Reader

Abstract

The application discloses a neural network structure searching method and device, equipment and a storage medium. The method comprises the following steps: in response to obtaining a training attribute parameter of a training data set, generating an initial neural network structure based on the training attribute parameter; performing a structure growth operation on the initial neural network structure to generate a target search space; wherein the target search space comprises at least two first neural network structures, and the number of neurons and / or the number of channels of neurons in each first neural network structure are different; screening each first neural network structure based on a corresponding verification performance parameter of each first neural network structure in the target search space to obtain a second neural network structure; and determining a target neural network structure based on the second neural network structure and a preset search condition. The embodiment of the application solves the problem of a too large search space range of a traditional method, and reduces the amount of calculation resource consumption in the neural network searching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, and storage medium for searching neural network structures. Background Technology

[0002] Network Architecture Search (NAS) is a method that transforms the manual design process of neural network architectures into an automated optimization process. Specifically, the controller obtains multiple candidate neural network architectures from a pre-constructed search space. The architecture optimization module ranks these candidate neural network architectures according to their respective training results and feeds this ranking information back to the controller, enabling the controller to optimize its selection strategy. When the loop termination condition is met, the candidate neural network architecture with the best training results is selected as the target neural network architecture.

[0003] In the process of realizing this invention, at least the following technical problems were found in the prior art:

[0004] The pre-constructed search space needs to include all possible combinations of the target neural network structure, making the traditional search space often quite large. Each time the controller selects a candidate neural network structure from the search space, it consumes a significant amount of computational resources. For example, when the traditional NAS method searches for neural network structures based on the CIFAR10 dataset, it requires 2000 GPUs running simultaneously for a whole day to obtain the target neural network structure. Therefore, traditional neural network structure search methods consume a lot of computational resources and have low search efficiency. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and storage medium for searching neural network structures, in order to solve the problem of excessively large search space in traditional methods, reduce the consumption of computing resources during the neural network search process, and improve the search efficiency of neural network structures.

[0006] According to an embodiment of the present invention, a method for searching neural network structures is provided, the method comprising:

[0007] In response to obtaining the training attribute parameters of the training dataset, an initial neural network structure is generated based on the training attribute parameters;

[0008] A structure growth operation is performed on the initial neural network structure to generate a target search space; wherein the target search space contains at least two first neural network structures, and the number of neurons and / or the number of channels of the neurons are different in each first neural network structure;

[0009] Based on the verification performance parameters corresponding to each of the first neural network structures in the target search space, the first neural network structures are screened to obtain the second neural network structure;

[0010] Based on the second neural network structure and the preset search conditions, the target neural network structure is determined.

[0011] According to another embodiment of the present invention, a search device for neural network structures is provided, the device comprising:

[0012] An initial neural network structure generation module is used to generate an initial neural network structure based on the training attribute parameters obtained from the training dataset in response to the training attribute parameters.

[0013] A target search space generation module is used to perform a structure growth operation on the initial neural network structure to generate a target search space; wherein, the target search space contains at least two first neural network structures, and the number of neurons and / or the number of channels of the neurons in each first neural network structure are different;

[0014] The second neural network structure determination module is used to filter each of the first neural network structures based on the verification performance parameters corresponding to each of the first neural network structures in the target search space, and obtain the second neural network structure.

[0015] The target neural network structure determination module is used to determine the target neural network structure based on the second neural network structure and preset search conditions.

[0016] According to another embodiment of the present invention, an electronic device is provided, the electronic device comprising:

[0017] At least one processor; and

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the neural network structure search method according to any embodiment of the present invention.

[0020] According to another embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being used to cause a processor to execute and implement the search method for neural network structures according to any embodiment of the present invention.

[0021] The technical solution of this invention generates a target search space by performing a structure growth operation on an initial neural network structure generated based on training attribute parameters. The target search space contains at least two first neural network structures. Based on the verification performance parameters corresponding to each first neural network structure in the target search space, each first neural network structure is screened to obtain a second neural network structure. Based on the second neural network structure and preset search conditions, a target neural network structure is determined. This generates the target search space during the neural network structure search process, solving the problem that traditional search spaces require pre-construction manually. Furthermore, since the target search space is generated based on the initial neural network structure, the range of the generated target search space is much smaller than that of traditional search spaces, thereby reducing the computational resource consumption during the neural network search process and improving the search efficiency of the neural network structure.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating a method for searching a neural network structure according to an embodiment of the present invention;

[0025] Figure 2A This is a schematic diagram of an initial neural network structure provided in one embodiment of the present invention;

[0026] Figure 2B A flowchart illustrating a specific example of a neural network structure search method provided in an embodiment of the present invention;

[0027] Figure 2C This is a schematic diagram of a target search space provided in one embodiment of the present invention;

[0028] Figure 3 A schematic diagram of a third neural network structure provided in one embodiment of the present invention;

[0029] Figure 4 A flowchart illustrating a method for searching another neural network structure according to an embodiment of the present invention;

[0030] Figure 5A This is a schematic diagram of a channel splitting structure provided in one embodiment of the present invention;

[0031] Figure 5B This is a schematic diagram of a neuron splitting structure provided in one embodiment of the present invention;

[0032] Figure 6 This is a schematic diagram of a search device for a neural network structure provided in one embodiment of the present invention;

[0033] Figure 7 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] Figure 1 This is a flowchart illustrating a method for searching neural network structures according to an embodiment of the present invention. This embodiment is applicable to situations involving the search of neural network structures. The method can be executed by a neural network structure search device, which can be implemented in hardware and / or software and can be configured in a terminal device. Figure 1 As shown, the method includes:

[0037] S110. In response to obtaining the training attribute parameters of the training dataset, generate an initial neural network structure based on the training attribute parameters.

[0038] Specifically, the training dataset is used to represent the dataset that needs to be processed by the neural network structure. For example, the category of the training dataset can be an image dataset, and the training task to which the image dataset belongs can be image classification, object detection, or image segmentation, etc.

[0039] Specifically, training attribute parameters can be used to characterize the input and output attribute parameters of the training dataset. In one embodiment, when the training dataset is an image dataset and the training task is image classification, the training attribute parameters include 3 and the number of categories. "3" represents the input attribute parameters of the image dataset, including the R, G, and B channels, and "number of categories" represents the output attribute parameters of the image dataset. For example, when the image dataset is a CIFAR-10 dataset, and the number of image categories in the CIFAR-10 dataset is 10, then the output attribute parameter is 10.

[0040] Unless otherwise stated, in the description of embodiments of the present invention, the neuron and its cascaded BatchNorm and nonlinear function are regarded as a whole and collectively referred to as a neuron.

[0041] Specifically, the initial neural network structure generated based on the training attribute parameters includes a global pooling layer and a neuron (excluding BatchNorm and non-linear functions). This initial neural network structure can be represented as network1, and the neuron can be represented as... Where ri1, ro1, ci1, and co1 represent the input resolution, output resolution, number of input channels, and number of output channels of the neuron, respectively. For example, when the training dataset is the CIFAR-10 dataset, the training attribute parameters of the training dataset include input attribute parameter = 3 and output attribute parameter = 10. Correspondingly, the neuron... ci1=3 and co1=10, and neurons are pre-set. The convolution kernel matrix is ​​1*1, and its initial weights are 0. The global pooling layer ensures that the resolution of the image data input to the initial neural network structure meets the resolution requirements of the initial neural network structure. For example, if the resolution of the image data is 32*32, then after passing through the global pooling layer, the resolution of the output data will be 1*1.

[0042] Figure 2A This is a schematic diagram of an initial neural network structure provided in one embodiment of the present invention. Specifically, the initial neural network structure includes a global pooling layer and neurons. Where ri1 = ro1 = 1*1, ci1 = 3, co1 = 10. The input attribute parameters of the image data input to the initial neural network structure are 3, and the resolution is 32*32. The output attribute parameters of the output data of the global pooling layer are 3, and the resolution is 3*1*1. Neurons... The output data has a resolution of 1*1 and 10 categories.

[0043] S120. Perform a structure growth operation on the initial neural network structure to generate the target search space.

[0044] In this embodiment, the target search space includes at least two first neural network structures, each with a different number of neurons and / or a different number of channels in its neurons.

[0045] In one embodiment, specifically, performing a structure growth operation on the initial neural network structure to generate a target search space includes: performing a stage growth operation on the initial neural network structure to obtain a third neural network structure; wherein the stage growth operation includes adding new neurons to the initial neural network structure; and performing a depth growth operation on the third neural network structure to generate a target search space; wherein the depth growth operation includes splitting the neurons and channels in the third neural network structure.

[0046] Specifically, in the staged growth operation, the initial resolution of the newly added neuron in the third neural network structure is a preset multiple of the resolution of the next neuron connected to it. For example, this preset multiple is 2 or 3 times. After the staged growth operation, the difference between the number of neurons in the third neural network structure and the number of neurons in the initial neural network structure is 1. It can be understood that after adding a new neuron to the initial neural network structure, the resolution of all neurons before the newly added neuron increases by a preset multiple, resulting in the third neural network structure. In this embodiment, the purpose of the staged growth operation is to increase the resolution of each neuron in the third neural network structure.

[0047] Specifically, a copying operation is performed on the third neural network structure to obtain at least two third neural network structures. A depth growth operation is then performed on each of the third neural network structures to obtain the target search space network. s ' N ={network i '1,network i '2...network i ' j ...network i ' N}, where network i 'j This represents the third neural network structure, network, which replicates the j-th copy. ij The corresponding first neural network structure.

[0048] In the deep growth operation, for each first neural network structure in the target search space, the number of neurons in the first neural network structure is greater than the number of neurons in the third neural network structure, or the number of channels of the neurons in the first neural network structure is greater than the number of channels of the neurons in the third neural network structure. It can be understood that when the number of input channels of neuron A in the third neural network structure increases, the number of output channels of the neuron connected to neuron A increases accordingly; conversely, when the number of output channels of neuron A in the third neural network structure increases, the number of input channels of the next neuron connected to neuron A increases accordingly. In this embodiment, growth is performed based on the third neural network structure in either the neuron dimension or the channel dimension to construct the target search space, wherein the network structure of each first neural network structure in the target search space becomes wider and deeper than the third neural network structure.

[0049] S130. Based on the verification performance parameters corresponding to the first neural network structures in the target search space, the first neural network structures are screened to obtain the second neural network structure.

[0050] Specifically, based on the validation dataset, validation performance parameters are determined for at least two first neural network structures in the target search space. For example, these validation performance parameters include, but are not limited to, at least one of precision, accuracy, and recall. Specifically, the second neural network structure is the first neural network structure with the highest validation performance parameter in the target search space.

[0051] S140. Based on the second neural network structure and preset search conditions, determine the target neural network structure.

[0052] In one embodiment, specifically, determining the target neural network structure based on the second neural network structure and preset search conditions includes: if the training performance parameters of the second neural network structure meet the preset search conditions, then the second neural network structure is used as the target neural network structure; if the training performance parameters of the second neural network structure do not meet the preset search conditions, then the second neural network structure is used as the initial neural network structure, and the process returns to the step of performing a structure growth operation on the initial neural network structure to generate the target search space.

[0053] Specifically, based on the training dataset, the training performance parameters of the second neural network structure are determined. For example, these parameters include, but are not limited to, at least one of accuracy, precision, and recall. Preset search conditions include the training performance parameter being greater than a preset parameter threshold. For instance, assuming the training performance parameter is accuracy and the preset threshold is 98%, if the accuracy is greater than 98%, it indicates that the training performance parameter meets the preset search conditions, and the second neural network structure is used as the target neural network structure, completing the neural network structure search process. If the accuracy is less than or equal to 98%, it indicates that the training performance parameter does not meet the preset search conditions, and the second neural network structure is used as the initial neural network structure. The process then returns to performing a structure growth operation on the initial neural network structure to generate the target search space.

[0054] In one embodiment, specifically, the controller (such as a GPU) acquires the training attribute parameters of the training dataset received by the input device, generates an initial neural network structure based on the training attribute parameters, performs a structure growth operation on the initial neural network structure, and generates a target search space. The controller sends the target search space to the central processing unit (CPU). The CPU filters each first neural network structure based on the verification performance parameters corresponding to each first neural network structure in the target search space to obtain a second neural network structure, and sends the second neural network structure to a condition judgment device. The condition judgment device, based on the training dataset, determines whether the training performance parameters of the second neural network structure meet the preset search conditions. If yes, the second neural network structure is used as the target neural network structure and sent to the output device so that the output device can output the target neural network structure. If no, the second neural network structure is used as the initial neural network structure and sent to the controller so that the controller performs a structure growth operation on the received initial neural network structure to generate the target search space. The above steps are iteratively executed until the training performance parameters of the second neural network structure received by the condition judgment device meet the preset search conditions.

[0055] In one embodiment, specifically, the step of returning to perform a structure growth operation on the initial neural network structure to generate the target search space includes: determining whether the saturation parameter of the initial neural network structure meets a preset saturation condition; if yes, then returning to perform a stage growth operation on the initial neural network structure to obtain a third neural network structure; if no, then using the initial neural network structure as the third neural network structure, returning to perform a depth growth operation on the third neural network structure to generate the target search space.

[0056] The preset saturation conditions include that the current validation accuracy of the initial neural network structure is less than the previous validation accuracy corresponding to the initial neural network structure obtained in the previous iteration, and that the number of stage neurons in the initial neural network structure is less than the sum of the logarithm of the image size corresponding to the training dataset and the first value.

[0057] Specifically, based on the validation dataset, the current validation accuracy of the initial neural network structure is determined. In the initial neural network structure, at least two neurons with the same input resolution constitute a stage neuron set. For example, the first value is 1, and correspondingly, the number Q of stage neuron sets in the preset saturation condition satisfies the formula Q < [log2(r)] + 1, where r represents the image size corresponding to the training dataset.

[0058] Figure 2B This is a flowchart illustrating a specific example of a neural network structure search method provided in an embodiment of the present invention. Specifically, based on the training attribute parameters of the training dataset, an initial neural network structure is generated. A stage growth operation is performed on the initial neural network structure to obtain a third neural network structure. A depth growth operation is then performed on the third neural network structure to obtain a target search space. Based on the verification performance parameters corresponding to each first neural network structure in the target search space, each first neural network structure is filtered to obtain a second neural network structure. It is then determined whether the training performance parameters of the second neural network structure meet the preset search conditions. If not, the second neural network structure is used as the initial neural network structure. Next, it is determined whether the training performance parameters of the initial neural network structure meet the preset saturation conditions. If the training performance parameters of the initial neural network structure meet the preset saturation conditions, the process returns to the stage growth operation step. If the training performance parameters of the initial neural network structure do not meet the preset saturation conditions, the initial neural network structure is used as the third neural network structure, and the process returns to the depth growth operation step. This process continues until the training performance parameters of the second neural network structure meet the preset search conditions, at which point the second neural network structure is used as the target neural network structure.

[0059] Figure 2C This is a schematic diagram of a target search space provided in one embodiment of the present invention. Specifically, Figure 2C The diagram illustrates a three-layer target search space. "1" represents the initial neural network structure generated based on training attribute parameters, constituting target search space 1. "11", "12", and "13" represent the three first neural network structures obtained by performing a structure growth operation on "1", constituting target search space 2. "11" represents the first neural network structure in target search space 2 with the highest validation performance parameters. "111" and "112" represent the two first neural network structures obtained by performing a structure growth operation on "11", constituting target search space 3.

[0060] by Figure 2C For example, the search space pre-constructed by existing technologies needs to include nine neural network structures: “1”, “11”, “12”, “13”, “111”, “112”, “121”, “131”, and “132”. However, the overall search space constructed based on the neural network structure provided in the above embodiments of the present invention only includes six neural network structures: “1”, “11”, “12”, “13”, “111”, and “112”, thus achieving the goal of narrowing the traditional search space range.

[0061] The technical solution of this embodiment generates a target search space by performing a structure growth operation on an initial neural network structure generated based on training attribute parameters. The target search space contains at least two first neural network structures. Based on the verification performance parameters corresponding to each first neural network structure in the target search space, each first neural network structure is screened to obtain a second neural network structure. Based on the second neural network structure and preset search conditions, the target neural network structure is determined. This generates the target search space during the neural network structure search process, solving the problem that the traditional search space needs to be manually constructed in advance. Furthermore, since the target search space is generated based on the initial neural network structure, the range of the generated target search space is much smaller than the range of the traditional search space, thereby reducing the computational resource consumption during the neural network search process and improving the search efficiency of the neural network structure.

[0062] Based on the above embodiments, specifically, a stage growth operation is performed on the initial neural network structure to obtain a third neural network structure, including: generating new neurons based on the resolution corresponding to the last neuron in the initial neural network structure; wherein the initial resolution corresponding to the new neurons is a preset multiple of the resolution corresponding to the last neuron; and generating the third neural network structure based on the new neurons, the new pooling layer, and the initial neural network structure.

[0063] For example, the preset multiplier can be 2x or 3x. The following embodiments of the present invention are all illustrated using a preset multiplier of 2x.

[0064] The third neural network structure can be represented as network i The newly added neuron can be represented as ri i =ro i =2ri m =2ro m , among which, ri m and ro m Ci represents the input resolution and output resolution corresponding to the last neuron, respectively.i With newly added neurons The number of output channels of the connected preceding neurons is the same, co i With newly added neurons The next neuron connected to it has the same number of input channels.

[0065] Specifically, the role of the newly added pooling layer is to enable the addition of new neurons. The resolution of the output data satisfies the requirements of the newly added neurons. The resolution requirements of the next connected neuron.

[0066] In one embodiment, the size of the convolutional kernel of the newly added neuron is a preset initial size, and the initial weights of the convolutional kernel are an identity matrix. For example, the preset initial size is 3*3.

[0067] The advantage of this setup is that, according to network morphism theory, setting the initial weights of the convolution kernel to the identity matrix allows the newly generated neural network structure to retain the performance of the old neural network, thereby avoiding the need to retrain the newly generated neural network structure from scratch, improving the training speed of the newly generated neural network structure, and thus improving the search efficiency of the neural network structure.

[0068] Figure 3 This is a schematic diagram of a third neural network structure provided in one embodiment of the present invention. Specifically, the third neural network structure is based on the initial neural network structure network1, with the addition of neurons. And pooling layers. Where ri2=ro2=2*2, ci2=3, co2=3.

[0069] In one embodiment, specifically, before performing a depth growth operation on the third neural network structure to generate the target search space, the method further includes: performing an incomplete training operation on the third neural network structure based on a first preset number of training iterations to obtain a trained third neural network structure. For example, the first preset number of training iterations can be 3 or 5.

[0070] The advantage of this approach is that existing technologies typically employ full training, where the neural network structure is trained to convergence before its performance is evaluated. This is not only time-consuming but also requires setting appropriate training strategies, such as the learning rate, to ensure that the neural network structure can be trained to convergence. By using incomplete training, the effectiveness of full training is achieved or even surpassed, while reducing the time consumed by training operations, thereby improving the search efficiency of the neural network structure.

[0071] In one embodiment, specifically, performing a deep growth operation on the third neural network structure to generate a target search space includes: generating an initial search space based on the number of stage neuron sets corresponding to the third neural network structure; wherein, the input resolutions corresponding to each stage neuron set in the same stage neuron set are the same, and the input resolutions corresponding to each stage neuron set are different, and the initial search space contains at least two third neural network structures; for each third neural network structure in the initial search space, determining the target stage neuron set and splitting type corresponding to the third neural network structure based on the identifier sequence number of the third neural network structure in the initial search space; performing a deep growth operation on the third neural network structure based on the target stage neuron set and splitting type to obtain a first neural network structure; and generating a target search space based on at least two first neural network structures.

[0072] In the third neural network structure, at least two neurons with the same input resolution constitute a stage neuron set, so that... Figure 3 For example, the number of stage neurons in the third neural network structure is 2, and the input resolutions corresponding to the two stage neuron sets are 2*2 and 1*1, respectively.

[0073] Specifically, the number of replications is determined based on the number of neurons in the stage set, and the initial neural search space is determined based on the number of replications and the third neural network structure. The number of replications N satisfies the formula: N = (ns-1)*2, where ns represents the number of neurons in the stage set. Correspondingly, the initial search space is determined by the network structure. sN ={network i1 network i2 ...network iN}.by Figure 3 For example, the number of copies is 2, and the initial search space contains 2 third neural network structures.

[0074] In one embodiment, specifically, determining the target stage neuron set and splitting type corresponding to the third neural network structure based on the identifier index of the third neural network structure in the initial search space includes: determining the target input resolution based on the identifier index of the third neural network structure in the initial search space, and taking the stage neuron set corresponding to the target input resolution as the target stage neuron set; if the identifier index meets the preset index range, then the splitting type corresponding to the third neural network structure is set to the channel splitting type; if the identifier index does not meet the preset index range, then the splitting type corresponding to the third neural network structure is set to the neuron splitting type.

[0075] For example, for the third neural network structure network in the initial search spaceij The target input resolution P satisfies the formula: P = 2 [j / 2] The square brackets "[]" indicate rounding up. Specifically, the target input resolution of the target stage neuron set corresponding to the first and second third neural network structures in the initial search space is 2*2, the target input resolution of the target stage neuron set corresponding to the third and fourth third neural network structures is 4*4, and so on.

[0076] Specifically, the preset sequence number range includes sequences that are multiples of 2 or sequences that are not multiples of 2. For example, the preset sequence number range is [2,4,6,8,10,12,14,16,18], or [1,3,5,7,9,11,13,15,17,19]. In another embodiment, it is determined whether the identifier sequence number satisfies the formula mod(j,2)=0. If yes, the splitting type corresponding to the third neural network structure is set to the channel splitting type; otherwise, the splitting type corresponding to the third neural network structure is set to the neuron splitting type.

[0077] Specifically, the splitting type can be either channel splitting or neuron splitting. If the splitting type is channel splitting, then in the third neural network structure, channel splitting operations are performed on the channels corresponding to each stage neuron in the target stage neuron set to obtain the first neural network structure. If the splitting type is neuron splitting, then in the third neural network structure, neuron splitting operations are performed on each stage neuron in the target stage neuron set to obtain the first neural network structure.

[0078] Figure 4 This is a flowchart illustrating another method for searching neural network structures according to an embodiment of the present invention. This embodiment further refines the technical feature of "performing a deep growth operation on a third neural network structure based on the target stage neuron set and splitting type to obtain a first neural network structure" in the above embodiment. Figure 4 As shown, the method includes:

[0079] S210. In response to obtaining the training attribute parameters of the training dataset, generate an initial neural network structure based on the training attribute parameters.

[0080] S220. Perform a stage growth operation on the initial neural network structure to obtain the third neural network structure.

[0081] S230. Based on the number of stage neurons corresponding to the third neural network structure, generate the initial search space.

[0082] S240. For each third neural network structure in the initial search space, based on the identifier of the third neural network structure in the initial search space, determine the target stage neuron set and splitting type corresponding to the third neural network structure.

[0083] S250. Determine if the split type is a channel split type. If yes, execute S260; otherwise, execute S280.

[0084] S260. Based on the validation dataset and the third neural network structure, determine the channel average gradient corresponding to each channel of each neuron in the target stage neuron set.

[0085] For example, suppose the validation dataset S = {(x1,y1),(x2,y2)...(x...} i ,y i ...(x) n ,y n )}, where x i Let y represent the i-th verification image data in the verification dataset. i Let G represent the classification label corresponding to the i-th verification image data. Using the chain rule, based on the verification dataset, determine the channel gradient set corresponding to each channel of each neuron in the target stage neuron set of the third neural network structure, where the channel gradient set G corresponding to the j-th channel is... j ={g 1j ,g 2j ...g ij ...g nj}, where g ij This represents the channel gradient corresponding to the j-th channel and the i-th verification image data. Here, the average channel gradient is...

[0086] S270. Based on the average gradient of each channel, determine the set of growth channels, and perform splitting operations on each channel in the set of growth channels to obtain the first neural network structure.

[0087] Specifically, the average gradients of each channel are sorted in descending order, and a preset number of channels with the highest average gradients are added to the growth channel set, or channels with average gradients exceeding a first preset gradient threshold are added to the growth channel set.

[0088] In one embodiment, specifically, performing a splitting operation on each channel in the growth channel set to obtain a first neural network structure includes: for each channel in the growth channel set, performing a parallel operation on the first splitting channel and the second splitting channel corresponding to the channel, and generating a channel splitting structure corresponding to the channel based on the summation function and the parallel first splitting channel and the second splitting channel; and generating a first neural network structure based on each channel splitting structure.

[0089] Figure 5A This is a schematic diagram of a channel splitting structure provided in one embodiment of the present invention. Figure 5A The input channel c1 of the i-th neuron in the third neural network structure is used as an example. Specifically, in the growth channel set, the input channel c1 is split to obtain the first split channel c11 and the second split channel c12. Figure 5A In the first neural network structure, the structure within the dashed box of the i-th neuron represents the channel splitting structure corresponding to channel c1. Specifically, the channel splitting structure includes a first splitting channel c11 and a second splitting channel c12 connected in parallel. The outputs corresponding to the first splitting channel c11 and the second splitting channel c12 are respectively input into the neuron neu after passing through a summation function. i middle.

[0090] It is understandable that in the i-th neuron of the third neural network structure, neu i After the input channel splits, it interacts with the neuron neu i The output channel number of the connected previous neuron is updated accordingly. In the i-th neuron of the third neural network structure, the output channel number is updated accordingly. i After the output channel splits, it interacts with the neuron neu i The number of input channels for the next connected neuron is updated accordingly.

[0091] In one embodiment, the first channel weight corresponding to the first split channel and the second channel weight corresponding to the second split channel can be preset or randomly generated.

[0092] In another embodiment, specifically, the first channel weight corresponding to the first split channel is a first preset ratio of the sum of the channel weight and the average gradient of the channel, and the second channel weight corresponding to the second split channel is a first preset ratio of the difference between the channel weight and the average gradient of the channel.

[0093] Specifically, the first preset ratio is 1 / 2. For example, the first channel weight of the first split channel corresponding to the original channel c1. Second channel weight Where, θ c1 g represents the channel weight corresponding to the original channel c1.c1 This represents the channel average gradient corresponding to the original channel c1.

[0094] Specifically, the output y = θ of the original channel c1 c1 *x, where x represents the input data of the original channel c1. After the channel splitting operation, the output y' = θ of the channel splitting structure corresponding to the original channel c1. c11 *x+θ c12 *x=y.

[0095] The advantage of this setup is that, by employing network morphism theory, the output of the channel splitting structure obtained from the original channel splitting is the same as the output of the original channel. This allows the generated first neural network structure to retain the network performance of its corresponding third neural network structure, avoiding the need to retrain the first neural network structure from scratch. This improves the training speed of the newly generated neural network structure and thus enhances the search efficiency of the neural network structure.

[0096] S280. Based on the validation dataset and the third neural network structure, determine the average gradient of neurons in each stage of the target stage neuron set.

[0097] For example, suppose the validation dataset S = {(x1,y1),(x2,y2)...(x...} i ,y i ...(x) n ,y n )}, where x i Let y represent the i-th verification image data in the verification dataset. i Let represent the classification label corresponding to the i-th verification image data. Using the chain rule, based on the verification dataset, determine the neuron gradient sets corresponding to neurons in each stage of the target stage neuron set in the third neural network structure, where the neuron gradient set R corresponding to the j-th neuron is... j ={r 1j ,r 2j ...r ij ...r nj}, where r ij This represents the gradient of the j-th neuron corresponding to the i-th verification image data. Here, the average gradient of the neuron is...

[0098] S290. Based on the average gradient of each neuron, determine the set of growing neurons, and perform splitting operations on at least one stage neuron in the set of growing neurons to obtain the first neural network structure.

[0099] Specifically, the average gradients of each neuron are sorted in descending order, and a predetermined number of neurons with the highest average gradients are added to the set of growing neurons. Alternatively, neurons with average gradients exceeding a first predetermined gradient threshold are added to the set of growing neurons.

[0100] In one embodiment, specifically, for each stage neuron in the set of growing neurons, a neuron splitting structure corresponding to the stage neuron is generated based on a concatenation function, a summation function, and the first and second splitting neurons corresponding to the stage neuron; and a first neural network structure is generated based on each neuron splitting structure.

[0101] Figure 5B This is a schematic diagram of a neuron splitting structure provided in one embodiment of the present invention. Specifically, Figure 5B The left side represents the i-th neuron in the third neural network structure. i The right side shows the neuron neu i The neuronal splitting structure obtained after performing the splitting operation, specifically, includes the first splitting neuron (neu) i1 Second split neuron neu i2 Series functions and summation functions.

[0102] In one embodiment, the weight of the first neuron corresponding to the first splitting neuron is a first preset neuron value, and the weight of the second neuron corresponding to the second splitting neuron is a second preset neuron value. Users can customize the first and second preset neuron values ​​according to their actual needs.

[0103] In another embodiment, specifically, the weight of the first neuron corresponding to the first split neuron is a first preset ratio of the difference between the average gradient of the neuron corresponding to the stage neuron and the neuron weight, and the weight of the second neuron corresponding to the second split neuron is a concatenated function value consisting of the first preset ratio of the sum of the average gradient of the neuron corresponding to the stage neuron and the neuron weight, plus the zero value.

[0104] Specifically, the first preset ratio is 1 / 2. For example, the weight of the first neuron of the first splitting neuron corresponding to stage neuron n1. Second neuron weights Where, θ n1 The weight r represents the neuron weight corresponding to stage neuron n1. n1 This represents the average gradient of the neuron corresponding to stage neuron n1.

[0105] Specifically, the output of stage neuron n1 is y = conv(θ). n1,x), where x represents the input data of stage neuron n1. After the neuron splitting operation, the output y1 of the first split neuron is conv(θ). n11 The output y2 of the second splitting neuron is conv(θ). n12 The output of the neuron splitting structure corresponding to neuron n1 in the concat(x,y1) stage is y' = y1 + y2 = y.

[0106] The advantage of this setup is that, by employing network morphism theory, the output of the neuron splitting structure obtained from the splitting of stage neurons is the same as the output of the stage neurons. This allows the generated first neural network structure to retain the network performance of its corresponding third neural network structure, avoiding the need to retrain the first neural network structure from scratch. This improves the training speed of the newly generated neural network structure and thus enhances the search efficiency of the neural network structure.

[0107] S291. Generate the target search space based on at least two first neural network structures.

[0108] In one embodiment, specifically, generating a target search space based on at least two first neural network structures includes: performing incomplete training operations on each of the at least two first neural network structures based on a second preset number of training iterations to obtain the target search space. For example, the second preset number of training iterations can be 3 or 5.

[0109] The advantage of this approach is that existing technologies typically employ full training, where the neural network structure is trained to convergence before its performance is evaluated. This is not only time-consuming but also requires setting appropriate training strategies, such as the learning rate, to ensure that the neural network structure can be trained to convergence. By using incomplete training, the effectiveness of full training is achieved or even surpassed, while reducing the time consumed by training operations, thereby improving the search efficiency of the neural network structure.

[0110] S292. Based on the verification performance parameters corresponding to the first neural network structures in the target search space, the first neural network structures are screened to obtain the second neural network structure.

[0111] S293. Determine the target neural network structure based on the second neural network structure and preset search conditions.

[0112] The technical solution of this embodiment determines the splitting type of the current third neural network structure. When the splitting type is a channel splitting type, a growth channel set is determined based on the average gradient of each channel of each stage neuron in the target stage neural set. A splitting operation is then performed on each channel in the growth channel set to obtain the first neural network structure. When the splitting type is a neuron splitting type, a growth neuron set is determined based on the average gradient of each stage neuron in the target stage neural set. A splitting operation is then performed on each neuron in the growth neuron set to obtain the first neural network structure. This solves the splitting problem of each third neural network structure in the initial search space. Using the average gradient parameter can improve the accuracy of the selected growth channel set or growth neuron set, further improving the search efficiency of the neural network structure.

[0113] Furthermore, in existing technologies, the initialization parameters of each unit structure in a neural network are randomly generated. However, in this embodiment of the invention, the neuron weights of each newly added neuron, split neuron, and split channel weights all use determined initialization parameters, thereby making the search results of the neural network structure in this embodiment reproducible. Existing technologies require fine-tuning the target neural network structure after obtaining it, but this embodiment of the invention, due to the use of network morphism technology, allows the target neural network structure to retain the network performance of the previous neural network structure; therefore, fine-tuning is not required.

[0114] The neural network structure search method provided in this embodiment of the invention was used to search the CIFAR-10 dataset. The search can be completed in one day using only one GPU, and the accuracy rate on the test dataset is 92.7%. This is higher than that of manually designed ResNet and VGG networks in terms of both network parameters and accuracy.

[0115] Figure 6 This is a schematic diagram of a search device for a neural network structure provided in one embodiment of the present invention. Figure 6 As shown, the device includes: an initial neural network structure generation module 310, a target search space generation module 320, a second neural network structure determination module 330, and a target neural network structure determination module 340.

[0116] The initial neural network structure generation module 310 is used to generate an initial neural network structure based on the training attribute parameters obtained from the training dataset in response to the training attribute parameters.

[0117] The target search space generation module 320 is used to perform a structure growth operation on the initial neural network structure to generate a target search space; wherein, the target search space contains at least two first neural network structures, and the number of neurons and / or the number of channels of the neurons are different in each first neural network structure;

[0118] The second neural network structure determination module 330 is used to filter each first neural network structure based on the verification performance parameters corresponding to each first neural network structure in the target search space to obtain the second neural network structure.

[0119] The target neural network structure determination module 340 is used to determine the target neural network structure based on the second neural network structure and preset search conditions.

[0120] The technical solution of this embodiment generates a target search space by performing a structure growth operation on an initial neural network structure generated based on training attribute parameters. The target search space contains at least two first neural network structures. Based on the verification performance parameters corresponding to each first neural network structure in the target search space, each first neural network structure is screened to obtain a second neural network structure. Based on the second neural network structure and preset search conditions, the target neural network structure is determined. This generates the target search space during the neural network structure search process, solving the problem that the traditional search space needs to be manually constructed in advance. Furthermore, since the target search space is generated based on the initial neural network structure, the range of the generated target search space is much smaller than the range of the traditional search space, thereby reducing the computational resource consumption during the neural network search process and improving the search efficiency of the neural network structure.

[0121] Based on the above embodiments, the target neural network structure determination module 340 includes:

[0122] The target neural network structure determination unit is used to determine the second neural network structure as the target neural network structure if the training performance parameters of the second neural network structure meet the preset search conditions.

[0123] The return execution unit is used to take the second neural network structure as the initial neural network structure if the training performance parameters of the second neural network structure do not meet the preset search conditions, and return to execute the step of performing a structure growth operation on the initial neural network structure to generate the target search space.

[0124] Based on the above embodiments, the target search space generation module 320 includes:

[0125] The third neural network structure determination unit is used to perform a stage growth operation on the initial neural network structure to obtain the third neural network structure; wherein, the stage growth operation includes the operation of adding new neurons to the initial neural network structure;

[0126] The target search space generation unit is used to perform a depth growth operation on the third neural network structure to generate the target search space; wherein, the depth growth operation includes the operation of splitting neurons and channels in the third neural network structure.

[0127] Based on the above embodiments, the return execution unit is specifically used for:

[0128] Determine whether the saturation parameters of the initial neural network structure meet the preset saturation conditions;

[0129] If so, return to the step of performing a stage growth operation on the initial neural network structure to obtain the third neural network structure;

[0130] If not, the initial neural network structure is used as the third neural network structure, and the process returns to the step of performing a depth growth operation on the third neural network structure to generate the target search space.

[0131] The preset saturation conditions include that the current validation accuracy of the initial neural network structure is less than the previous validation accuracy corresponding to the initial neural network structure obtained in the previous iteration, and that the number of stage neurons in the initial neural network structure is less than the sum of the logarithm of the image size corresponding to the training dataset and the first value.

[0132] Based on the above embodiments, the third neural network structure determination unit is specifically used for:

[0133] New neurons are generated based on the input resolution corresponding to the last neuron in the initial neural network structure; wherein the initial resolution corresponding to the new neurons is a preset multiple of the resolution corresponding to the last neuron.

[0134] Based on the newly added neurons, newly added pooling layers, and the initial neural network structure, a third neural network structure is generated.

[0135] Based on the above embodiments, the size of the convolution kernel of the newly added neuron is a preset initial size, and the initial weight of the convolution kernel is an identity matrix.

[0136] Based on the above embodiments, the device further includes:

[0137] The first incomplete training module is used to perform an incomplete training operation on the third neural network structure based on a first preset number of training iterations before performing a depth growth operation on the third neural network structure to generate the target search space, so as to obtain the trained third neural network structure.

[0138] Based on the above embodiments, the target search space generation unit includes:

[0139] An initial search space generation subunit is used to generate an initial search space based on the number of stage neuron sets corresponding to the third neural network structure; wherein, the input resolutions of each stage neuron in the same stage neuron set are the same, and the input resolutions of each stage neuron set are different, and the initial search space contains at least two third neural network structures.

[0140] The split type determination subunit is used to determine the target stage neuron set and split type corresponding to each third neural network structure in the initial search space, based on the identifier index of the third neural network structure in the initial search space.

[0141] The first neural network structure determination subunit is used to perform a deep growth operation on the third neural network structure based on the target stage neuron set and splitting type to obtain the first neural network structure;

[0142] The target search space generation subunit is used to generate the target search space based on at least two first neural network structures.

[0143] Based on the above embodiments, the splitting type determines the sub-unit, specifically for:

[0144] Based on the identifier of the third neural network structure in the initial search space, the target input resolution is determined, and the set of stage neurons corresponding to the target input resolution is taken as the target stage neuron set.

[0145] If the identifier number meets the preset number range, then the split type corresponding to the third neural network structure is set to the channel split type;

[0146] If the identifier number does not meet the preset number range, the splitting type corresponding to the third neural network structure will be set to the neuron splitting type.

[0147] Based on the above embodiments, the first neural network structure determines the sub-unit, specifically for:

[0148] If the splitting type is channel splitting, then based on the validation dataset and the third neural network structure, determine the channel average gradient corresponding to each channel of each neuron in the target stage neuron set.

[0149] Based on the average gradient of each channel, a set of growth channels is determined, and a splitting operation is performed on each channel in the set of growth channels to obtain the first neural network structure.

[0150] Based on the above embodiments, the first neural network structure determines the sub-unit, specifically for:

[0151] For each channel in the growth channel set, the first and second splitting channels corresponding to the channel are connected in parallel, and the channel splitting structure corresponding to the channel is generated based on the summation function and the parallel first and second splitting channels.

[0152] Based on the split structure of each channel, the first neural network structure is generated.

[0153] Based on the above embodiments, the first channel weight corresponding to the first split channel is a first preset ratio of the sum of the channel weight and the average gradient of the channel, and the second channel weight corresponding to the second split channel is a first preset ratio of the difference between the channel weight and the average gradient of the channel.

[0154] Based on the above embodiments, the first neural network structure determines the sub-unit, specifically for:

[0155] If the splitting type is neuron splitting, then based on the validation dataset and the third neural network structure, determine the average gradient of each neuron in the target stage neuron set;

[0156] Based on the average gradient of each neuron, the set of growing neurons is determined, and splitting operations are performed on at least one stage neuron in the set of growing neurons to obtain the first neural network structure.

[0157] Based on the above embodiments, the first neural network structure determines the sub-unit, specifically for:

[0158] For each stage neuron in the set of growing neurons, the neuronal splitting structure corresponding to the stage neuron is generated based on the concatenation function, the summation function, the first splitting neuron and the second splitting neuron corresponding to the stage neuron.

[0159] The first neural network structure is generated based on the splitting structure of each neuron.

[0160] Based on the above embodiments, the weight of the first neuron corresponding to the first split neuron is a first preset ratio of the difference between the average gradient of the neuron corresponding to the stage neuron and the neuron weight, and the weight of the second neuron corresponding to the second split neuron is a concatenated function value composed of the sum of the average gradient of the neuron corresponding to the stage neuron and the neuron weight, and the zero value.

[0161] Based on the above embodiments, the target search space generation sub-unit is specifically used for:

[0162] Based on the second preset number of training iterations, incomplete training operations are performed on at least two first neural network structures to obtain the target search space.

[0163] The neural network structure search device provided in the embodiments of the present invention can execute the neural network structure search method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0164] Figure 7 This is a schematic diagram of an electronic device provided according to one embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0165] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0166] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0167] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as methods for searching neural network architectures.

[0168] In some embodiments, the neural network architecture search method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the neural network architecture search method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the neural network architecture search method by any other suitable means (e.g., by means of firmware).

[0169] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0170] Computer programs for implementing the search method for the neural network structure of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0171] One embodiment of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a method for searching a neural network structure, the method comprising:

[0172] In response to obtaining the training attribute parameters of the training dataset, an initial neural network structure is generated based on the training attribute parameters;

[0173] Perform a structure growth operation on the initial neural network structure to generate a target search space; wherein the target search space contains at least two first neural network structures, and the number of neurons and / or the number of channels of the neurons are different in each first neural network structure;

[0174] Based on the verification performance parameters corresponding to each first neural network structure in the target search space, the first neural network structures are screened to obtain the second neural network structure;

[0175] The target neural network structure is determined based on the second neural network structure and preset search conditions.

[0176] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0177] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0178] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0179] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0180] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0181] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for searching neural network structures, characterized in that, include: In response to obtaining the image channel parameters, image resolution, and output attribute parameters of the image dataset, an initial neural network structure is generated based on the image channel parameters, image resolution, and output attribute parameters. The output attribute parameters are associated with the training task to which the image dataset belongs. The initial neural network structure includes a global pooling layer and neurons. The hyperparameters of the neurons include input resolution, output resolution, number of input channels, and number of output channels. A structure growth operation is performed on the initial neural network structure to generate a target search space; wherein the target search space contains at least two first neural network structures, and the number of neurons and / or the number of channels of the neurons are different in each first neural network structure; Based on the verification performance parameters corresponding to each of the first neural network structures in the target search space, the first neural network structures are screened to obtain the second neural network structure; Based on the image dataset, the training performance parameters of the second neural network structure are determined, and the target neural network structure is determined according to the training performance parameters and preset search conditions; The step of performing a structure growth operation on the initial neural network structure to generate a target search space includes: performing a stage growth operation on the initial neural network structure to obtain a third neural network structure; wherein, the stage growth operation includes adding new neurons to the initial neural network structure; A depth growth operation is performed on the third neural network structure to generate a target search space; wherein the depth growth operation includes splitting the neurons and / or the channels of neurons in the third neural network structure.

2. The method of claim 1, wherein, The step of determining the target neural network structure based on the second neural network structure and preset search conditions includes: If the training performance parameters of the second neural network structure meet the preset search conditions, then the second neural network structure will be used as the target neural network structure. If the training performance parameters of the second neural network structure do not meet the preset search conditions, the second neural network structure is used as the initial neural network structure, and the process returns to the step of performing a structure growth operation on the initial neural network structure to generate the target search space.

3. The method of claim 2, wherein, The step of returning to perform a structure growth operation on the initial neural network structure to generate the target search space includes: Determine whether the saturation parameters of the initial neural network structure satisfy a preset saturation condition; If so, return to the step of performing a stage growth operation on the initial neural network structure to obtain the third neural network structure; If not, the initial neural network structure is used as the third neural network structure, and the process returns to the step of performing a depth growth operation on the third neural network structure to generate the target search space. The preset saturation conditions include: the current verification accuracy of the initial neural network structure is less than the previous verification accuracy of the initial neural network structure obtained in the previous iteration; the number of stage neuron sets in the initial neural network structure is less than the sum of the logarithm of the image size corresponding to the image dataset and the first value; the input resolutions corresponding to each stage neuron set in the same stage neuron set are the same; and the input resolutions corresponding to each stage neuron set are different.

4. The method according to claim 1, characterized in that, The step of performing a stage growth operation on the initial neural network structure to obtain a third neural network structure includes: Based on the resolution corresponding to the last neuron in the initial neural network structure, new neurons are generated; wherein the initial resolution corresponding to the new neurons is a preset multiple of the resolution corresponding to the last neuron. Based on the newly added neurons, the newly added pooling layers, and the initial neural network structure, a third neural network structure is generated.

5. The method of claim 4, wherein, The size of the convolution kernel of the newly added neuron is a preset initial size, and the initial weights of the convolution kernel are an identity matrix.

6. The method of claim 1, wherein, Before performing a depth growth operation on the third neural network structure to generate the target search space, the method further includes: Based on the first preset number of training iterations, an incomplete training operation is performed on the third neural network structure to obtain the trained third neural network structure.

7. The method of claim 1, wherein, Perform a depth growth operation on the third neural network structure to generate the target search space, including: An initial search space is generated based on the number of stage neuron sets corresponding to the third neural network structure; wherein, the input resolutions of each stage neuron in the same stage neuron set are the same, and the input resolutions of each stage neuron set are different; the initial search space contains at least two third neural network structures. For each third neural network structure in the initial search space, the target stage neuron set and splitting type corresponding to the third neural network structure are determined based on the identifier of the third neural network structure in the initial search space. Based on the target stage neuron set and the splitting type, a deep growth operation is performed on the third neural network structure to obtain the first neural network structure. The target search space is generated based on at least two of the first neural network structures.

8. The method of claim 7, wherein, The step of determining the target stage neuron set and splitting type corresponding to the third neural network structure based on the identifier index of the third neural network structure in the initial search space includes: Based on the identifier of the third neural network structure in the initial search space, the target input resolution is determined, and the set of stage neurons corresponding to the target input resolution is taken as the target stage neuron set. If the identifier number meets the preset number range, then the split type corresponding to the third neural network structure is set to the channel split type; If the identifier number does not meet the preset number range, then the splitting type corresponding to the third neural network structure is set to the neuron splitting type.

9. The method according to claim 8, characterized in that, The first neural network structure is obtained by performing a deep growth operation on the third neural network structure based on the target stage neuron set and the splitting type, including: If the splitting type is a channel splitting type, then based on the validation dataset and the third neural network structure, the average channel gradient corresponding to each channel of each stage neuron in the target stage neuron set is determined. Based on the average gradient of each channel, a set of growth channels is determined, and a splitting operation is performed on each channel in the set of growth channels to obtain the first neural network structure.

10. The method of claim 9, wherein, The step of performing a splitting operation on each channel in the growth channel set to obtain the first neural network structure includes: For each channel in the growth channel set, the first split channel and the second split channel corresponding to the channel are connected in parallel, and the channel splitting structure corresponding to the channel is generated based on the summation function and the parallel first split channel and the second split channel. Based on the channel splitting structure, a first neural network structure is generated.

11. The method of claim 10, wherein, The first channel weight corresponding to the first split channel is a first preset ratio of the sum of the channel weight and the average gradient of the channel, and the second channel weight corresponding to the second split channel is a first preset ratio of the difference between the channel weight and the average gradient of the channel.

12. The method of claim 8, wherein, The first neural network structure is obtained by performing a deep growth operation on the third neural network structure based on the target stage neuron set and the splitting type, including: If the splitting type is a neuron splitting type, then based on the validation dataset and the third neural network structure, the average gradient of each neuron corresponding to each stage neuron in the target stage neuron set is determined. Based on the average gradient of each neuron, a set of growing neurons is determined, and a splitting operation is performed on at least one stage neuron in the set of growing neurons to obtain a first neural network structure.

13. The method of claim 12, wherein, The step of performing a splitting operation on at least one stage neuron in the set of growing neurons to obtain a first neural network structure includes: For each stage neuron in the set of growing neurons, a neuronal splitting structure corresponding to the stage neuron is generated based on a concatenation function, a summation function, and the first and second splitting neurons corresponding to the stage neuron. Based on the neuron splitting structure described above, a first neural network structure is generated.

14. The method of claim 13, wherein, The weight of the first neuron corresponding to the first split neuron is a first preset ratio of the difference between the average gradient of the neuron corresponding to the stage neuron and the neuron weight. The weight of the second neuron corresponding to the second split neuron is a concatenated function value consisting of the sum of the average gradient of the neuron corresponding to the stage neuron and the neuron weight, plus the zero value.

15. The method of claim 7, wherein, The generation of the target search space based on at least two of the first neural network structures includes: Based on a second preset number of training iterations, incomplete training operations are performed on at least two of the first neural network structures to obtain the target search space.

16. An apparatus for searching a neural network structure, the apparatus comprising: include: An initial neural network structure generation module is used to generate an initial neural network structure based on the image channel parameters, image resolution, and output attribute parameters of an image dataset in response to the acquisition of such parameters. The output attribute parameters are associated with the training task to which the image dataset belongs. The initial neural network structure includes a global pooling layer and neurons. The hyperparameters of the neurons include resolution and number of channels. A target search space generation module is used to perform a structure growth operation on the initial neural network structure to generate a target search space; wherein, the target search space contains at least two first neural network structures, and the number of neurons and / or the number of channels of the neurons in each first neural network structure are different; The second neural network structure determination module is used to filter each of the first neural network structures based on the verification performance parameters corresponding to each of the first neural network structures in the target search space, and obtain the second neural network structure. The target neural network structure determination module is used to determine the training performance parameters of the second neural network structure based on the image dataset, and to determine the target neural network structure according to the training performance parameters and preset search conditions; The target search space generation module includes: The third neural network structure determination unit is used to perform a stage growth operation on the initial neural network structure to obtain a third neural network structure; wherein, the stage growth operation includes the operation of adding new neurons to the initial neural network structure; A target search space generation unit is used to perform a depth growth operation on the third neural network structure to generate a target search space; wherein, the depth growth operation includes splitting the neurons and / or the channels of neurons in the third neural network structure.

17. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the search method for the neural network structure according to any one of claims 1-15.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for searching the neural network structure according to any one of claims 1-15.

Citation Information

Patent Citations

  • Neural network determination method and device, equipment and computer readable storage medium

    CN112699997A

  • Neural network structure searching method and device, electronic equipment and storage medium

    CN115222046A