A search method, apparatus and electronic device

By constructing a supernetwork and utilizing a search algorithm to quickly build a high-precision image recognition network on mobile devices, the problems of high computing power and design difficulty in existing technologies are solved, achieving efficient network construction and improved accuracy.

CN114595375BActive Publication Date: 2026-01-20BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011396358.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-03
Publication Date
2026-01-20
Estimated Expiration
2040-12-03

AI Technical Summary

Technical Problem

When implementing high-precision image recognition algorithms on mobile devices, existing technologies require high computing power and are difficult to design manually, consuming a lot of manpower, resources, and time.

Method used

By acquiring network construction information, a supernetwork is constructed and trained. Then, a search algorithm is used to search for subnetworks from the supernetwork to obtain the target network used to perform the target task.

Benefits of technology

It enables the rapid construction of high-precision image recognition networks on mobile devices, reducing computational complexity and design difficulty, and improving construction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595375B_ABST
    Figure CN114595375B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a search method, device and electronic equipment, wherein the method comprises: obtaining network construction information corresponding to a target task, the network construction information comprising search space information, sample data and search indicators; constructing a super network based on the search space information and training the super network based on the sample data, wherein the super network comprises a plurality of sub-networks; searching for a sub-network from the trained super network based on the search indicators to obtain a target network for executing the target task; compared with the prior art which requires manual design of a network, embodiments of the present application can adapt to a task and quickly construct a network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a search method, apparatus, and electronic device. Background Technology

[0002] One of the major scientific and technological research tasks facing humanity today is to reveal the working mechanism of the brain and the essence of human intelligence, and to create artificial intelligence systems capable of performing human intelligent activities. Neural networks study the brain's functions by starting with the structure of the brain's nervous system, examining the information processing capabilities and dynamic behavior of simple neurons in the human brain. After decades of development, neural networks now offer relatively satisfactory solutions to some long-standing problems in computer science and symbolic processing; they are widely used in many fields such as image recognition, pattern recognition, automatic control, signal processing, decision support, and artificial intelligence.

[0003] Image recognition algorithms based on neural networks can achieve high accuracy, but they also require significant computational power, making it very difficult to port them to mobile devices with limited computing resources. To achieve a balance between computational power and algorithm accuracy, lightweight network structures have been manually designed, making it possible to run high-precision image recognition algorithms on mobile devices. However, manually designing these networks is extremely difficult and requires substantial human, material, and time investment. Summary of the Invention

[0004] This invention provides a search method to adapt to tasks and quickly build networks.

[0005] Accordingly, embodiments of the present invention also provide a search device and an electronic device to ensure the implementation and application of the above method.

[0006] To address the aforementioned issues, this invention discloses a search method, specifically comprising: acquiring network construction information corresponding to a target task, the network construction information including: search space information, sample data, and search metrics; constructing a supernetwork based on the search space information, and training the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks; and searching for subnetworks from the trained supernetwork based on the search metrics to obtain a target network for performing the target task.

[0007] Optionally, the search space information includes: branch construction forms corresponding to multiple modules for constructing the hypernetwork; constructing the hypernetwork based on the search space information includes: extracting the branch construction forms corresponding to each module from the search space information; constructing each branch of the module according to the branch construction form corresponding to the module for each module; connecting the branches of the module in parallel to construct the module; and connecting the modules in series to construct the hypernetwork.

[0008] Optionally, the step of connecting the modules in series to construct the supernetwork includes: connecting the modules in series and connecting the inputs and outputs of each module to construct the supernetwork.

[0009] Optionally, the sample data includes training data, which includes training sample data and reference sample data corresponding to the training sample data. Training the supernetwork based on the sample data includes: selecting a subnetwork from the supernetwork, inputting the training sample data into the selected subnetwork for forward computation to obtain the data output by the selected subnetwork; and performing backpropagation on the selected subnetwork based on the data output by the selected subnetwork and the reference sample data.

[0010] Optionally, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the step of selecting a subnetwork from the supernetwork includes: selecting a branch from each module of the supernetwork, and connecting the selected branches from each module in series to form a subnetwork.

[0011] Optionally, the sample data includes test data, and the step of searching for subnetworks from the trained supernetwork based on the search metric to obtain the target network includes: using a search algorithm to search for subnetworks from the trained supernetwork; performing performance tests on the subnetworks by inputting the test data into the searched subnetworks to obtain the performance parameters of the subnetworks; and selecting the subnetwork with the best performance that meets the search metric from the searched subnetworks based on the performance parameters of the searched subnetworks as the target network.

[0012] Optionally, the method further includes: training the target network using the sample data.

[0013] This invention also discloses a search device, specifically comprising: an acquisition module for acquiring network construction information corresponding to a target task, the network construction information including: search space information, sample data, and search metrics; a construction module for constructing a supernetwork based on the search space information and training the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks; and a search module for searching subnetworks from the trained supernetwork based on the search metrics to obtain a target network for performing the target task.

[0014] Optionally, the search space information includes: branch construction forms corresponding to multiple modules for constructing the hypernetwork; the construction module includes: an information extraction submodule, used to extract the branch construction forms corresponding to each module from the search space information; a network module construction submodule, used to construct each branch of the module according to the branch construction form corresponding to the module for each module; and connect the branches of the module in parallel to construct the module; and a network construction submodule, used to connect the modules in series to construct the hypernetwork.

[0015] Optionally, the network construction submodule is used to connect the modules in series and connect the inputs and outputs of each module to construct the supernetwork.

[0016] Optionally, the sample data includes training data, which includes training sample data and reference sample data corresponding to the training sample data. The construction module includes: a forward computation submodule, used to select a subnetwork from the supernetwork, input the training sample data into the selected subnetwork for forward computation, and obtain the data output by the selected subnetwork; and a backpropagation submodule, used to perform backpropagation on the selected subnetwork based on the data output by the selected subnetwork and the reference sample data.

[0017] Optionally, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the forward computation submodule is used to select a branch from each module of the supernetwork, and connect the selected branches from each module in series to form a subnetwork.

[0018] Optionally, the sample data includes test data, and the search module includes: a network search submodule, used to search for subnetworks from the trained supernetwork using a search algorithm; a performance testing submodule, used to perform performance testing on the subnetworks by inputting the test data into the searched subnetworks to obtain the performance parameters of the subnetworks; and a network selection submodule, used to select the subnetwork with the best performance and that meets the search criteria from the searched subnetworks based on the performance parameters of the searched subnetworks as the target network.

[0019] Optionally, the apparatus further includes a training module for training the target network using the sample data.

[0020] This invention also discloses a readable storage medium, wherein when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device is able to perform a search method as described in any of the embodiments of this invention.

[0021] This invention also discloses an electronic device, including a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors. The programs include instructions for performing the following operations: acquiring network construction information corresponding to a target task, the network construction information including: search space information, sample data, and search metrics; constructing a supernetwork based on the search space information and training the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks; and searching for subnetworks from the trained supernetwork based on the search metrics to obtain a target network for performing the target task.

[0022] Optionally, the search space information includes: branch construction forms corresponding to multiple modules for constructing the hypernetwork; constructing the hypernetwork based on the search space information includes: extracting the branch construction forms corresponding to each module from the search space information; constructing each branch of the module according to the branch construction form corresponding to the module for each module; connecting the branches of the module in parallel to construct the module; and connecting the modules in series to construct the hypernetwork.

[0023] Optionally, the step of connecting the modules in series to construct the supernetwork includes: connecting the modules in series and connecting the inputs and outputs of each module to construct the supernetwork.

[0024] Optionally, the sample data includes training data, which includes training sample data and reference sample data corresponding to the training sample data. Training the supernetwork based on the sample data includes: selecting a subnetwork from the supernetwork, inputting the training sample data into the selected subnetwork for forward computation to obtain the data output by the selected subnetwork; and performing backpropagation on the selected subnetwork based on the data output by the selected subnetwork and the reference sample data.

[0025] Optionally, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the step of selecting a subnetwork from the supernetwork includes: selecting a branch from each module of the supernetwork, and connecting the selected branches from each module in series to form a subnetwork.

[0026] Optionally, the sample data includes test data, and the step of searching for subnetworks from the trained supernetwork based on the search metric to obtain the target network includes: using a search algorithm to search for subnetworks from the trained supernetwork; performing performance tests on the subnetworks by inputting the test data into the searched subnetworks to obtain the performance parameters of the subnetworks; and selecting the subnetwork with the best performance that meets the search metric from the searched subnetworks based on the performance parameters of the searched subnetworks as the target network.

[0027] Optionally, it also includes instructions for performing the following operation: training the target network using the sample data.

[0028] The embodiments of the present invention have the following advantages:

[0029] In this embodiment of the invention, network construction information corresponding to the target task can be obtained. This network construction information includes search space information, sample data, and search metrics. Then, a supernetwork is constructed based on the search space information, and the supernetwork is trained based on the sample data. Finally, subnetworks are searched from the trained supernetwork based on the search metrics to obtain the target network used to perform the target task. Compared to existing technologies that require manual network design, this embodiment of the invention is adaptable to the task and can quickly construct the network. Attached Figure Description

[0030] Figure 1 This is a flowchart illustrating the steps of an embodiment of the search method of the present invention;

[0031] Figure 2A This is a flowchart of an optional embodiment of the search method of the present invention;

[0032] Figure 2B This is a schematic diagram of a hypernetwork structure according to an embodiment of the present invention;

[0033] Figure 3 This is a flowchart of the steps of another optional embodiment of the search method of the present invention;

[0034] Figure 4 This is a structural block diagram of an embodiment of the search device of the present invention;

[0035] Figure 5 This is a structural block diagram of an optional embodiment of the search device of the present invention;

[0036] Figure 6 A structural block diagram of an electronic device for searching is shown according to an exemplary embodiment;

[0037] Figure 7 This is a schematic diagram of the structure of an electronic device for searching according to another exemplary embodiment of the present invention. Detailed Implementation

[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] This invention provides a network search platform / service that can execute the steps of the search method described in this invention, enabling rapid network construction adapted to specific tasks. Therefore, when a user needs to construct a network for performing a specific task, they can simply use this network search platform / service to search for the desired network, eliminating the need for manual network design.

[0040] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of the search method of the present invention, which may specifically include the following steps:

[0041] Step 102: Obtain network construction information corresponding to the target task. The network construction information includes: search space information, sample data, and search metrics.

[0042] In this embodiment of the invention, the task that the user needs to perform can be referred to as the target task, such as image recognition, image classification, image segmentation, etc. The network that the user needs to build to perform the target task can be referred to as the target network. In one example, the target network can be a neural network.

[0043] In one example of this invention, when a user needs to search for a target network for performing a target task using a web search platform / service, they can input network construction information corresponding to the target task into the web search platform / service. The web search platform / service can then obtain the network construction information input by the user corresponding to the target task; the network construction information can refer to information used to construct the target network. In one example, the network construction information may include search space information, sample data, and search metrics. The search space information may refer to information used to construct a hypernetwork, where a hypernetwork is a network that is superior to and surpasses existing networks; the sample data can be used to train the hypernetwork; the search metrics may include performance metrics of the target network and can be used to search for the target network from the hypernetwork.

[0044] In one example of the present invention, the network search platform / network search service can provide network construction information for various tasks. When a user needs to use the network search platform / network search service to search for a target network for performing a target task, they can select the network construction information corresponding to the target task within the network search platform / network search service; subsequently, the network search platform / network search service can obtain the network construction information selected by the user that corresponds to the target task.

[0045] Step 104: Construct a supernetwork based on the search space information, and train the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks.

[0046] Step 106: Based on the search metrics, search for subnetworks from the trained hypernetwork to obtain the target network for performing the target task.

[0047] In this embodiment of the invention, after obtaining search space information, the web search platform can construct a hypernetwork based on the search space information. The hypernetwork is then trained using sample data until the training termination condition is met; thus, the trained hypernetwork can be obtained.

[0048] The supernetwork may include multiple subnetworks. After obtaining the trained supernetwork, it can be searched to find multiple subnetworks. Then, a target network that meets the search criteria is selected from the searched subnetworks. The search method for the trained supernetwork may include various methods, such as random search algorithms, evolutionary search algorithms, reinforcement learning algorithms, etc., and this embodiment of the invention does not limit the methods used.

[0049] Users can then deploy the target network to corresponding terminal devices such as mobile terminals, CPUs (Central Processing Units), or GPUs (Graphics Processing Units); and execute the target task on the terminal device with the target network deployed. For example, an image can be input into the target network of the terminal device, and the target network can perform image recognition, image classification, image segmentation, and so on.

[0050] In summary, in this embodiment of the invention, network construction information corresponding to the target task can be obtained. This network construction information includes search space information, sample data, and search metrics. Then, a supernetwork is constructed based on the search space information, and the supernetwork is trained based on the sample data. Finally, subnetworks are searched from the trained supernetwork based on the search metrics to obtain the target network used to perform the target task. Compared to existing technologies that require manual network design, this embodiment of the invention is adaptable to the task and can quickly construct the network.

[0051] The following explains how to construct a hypernetwork, how to train a hypernetwork, and how to search for a target network.

[0052] Reference Figure 2A The diagram illustrates a flowchart of an optional embodiment of the search method of the present invention, which may specifically include the following steps:

[0053] Step 202: Obtain network construction information corresponding to the target task. The network construction information includes: search space information, sample data, and search metrics.

[0054] The search space information may include various information used to construct the hypernetwork, such as the definition of the hypernetwork's input data, the definition of the hypernetwork's output data, the definition of the hypernetwork's loss function, the number of modules constituting the hypernetwork, the branch construction form of the branches in each module of the hypernetwork, and the unit construction information of the units in each branch of the hypernetwork, such as the types of convolutional kernels included, the network width (number of channels in the convolutional layer), the network depth (number of network layers), etc.; the embodiments of the present invention do not limit this.

[0055] The sample data may include training data and test data, wherein the training data is used for network training and the test data is used for network testing.

[0056] The search metrics may include various performance metrics of the target network, such as computational accuracy and computational speed. Of course, the search metrics may also include other performance metrics of the target network, such as the memory occupied by computation. This embodiment of the invention does not limit this.

[0057] Then, a hypernetwork can be constructed based on the search space information, as described in steps 204 to 208:

[0058] Step 204: Extract the branch construction form corresponding to each module from the search space information.

[0059] Step 206: For each module, construct each branch of the module according to the branch construction form corresponding to the module; and connect the branches of the module in parallel to construct the module.

[0060] Step 208: Connect the modules in series to construct the supernetwork.

[0061] In this embodiment of the invention, the hypernetwork can be viewed as being composed of multiple modules connected in series. These modules may include an input module, an output module, and at least one module located between the input and output modules. Each module between the input and output modules may include at least one branch; when a module contains multiple branches, the module may be composed of multiple branches connected in parallel. A branch may include at least one unit; when a branch includes multiple units, the branch may be composed of multiple units connected in series, multiple units connected in parallel, or multiple units connected in both series and parallel.

[0062] This involves extracting the definition of the hypernetwork's input data from the search space information, and constructing the hypernetwork's input module based on this definition. It also involves extracting the definition of the hypernetwork's output data from the search space information, and constructing the hypernetwork's output module based on this definition. For each module between the input and output modules, its construction can be as follows: First, the branch construction form of each branch in each module can be extracted from the search space information. Then, for each module, its branches can be constructed according to the branch construction form of each branch. Furthermore, the unit construction information of each unit in each branch of the module can be extracted from the search space information. Then, when constructing each branch in the module, the branch can be constructed according to its branch construction form and the unit construction information of each unit it contains. Finally, the branches contained in the module are connected in parallel to construct the module.

[0063] After constructing all the modules, they can be chained together to obtain a hypernetwork; see reference. Figure 2B As shown. Figure 2B The hypernetwork consists of four modules: module 1 is the input module, module 4 is the output module, module 2 has three branches, and module 3 has four branches. A branch of module 2 can consist of three units.

[0064] In one example of the present invention, the step of connecting the modules in series to construct the supernetwork includes: connecting the modules in series and connecting the inputs and outputs of each module to construct the supernetwork; thereby obtaining networks of different depths. Whether to connect the inputs and outputs of the modules, and which modules' inputs and outputs to connect, can be determined according to the target task; the embodiments of the present invention do not impose restrictions on this.

[0065] Training the hypernetwork based on the sample data can refer to training the hypernetwork using training data from the sample data, and may include the following steps 210 to 212:

[0066] Step 210: Select a subnetwork from the supernetwork and input the training sample data into the selected subnetwork for forward computation to obtain the data output by the selected subnetwork.

[0067] Step 212: Based on the data output by the selected sub-network and the reference sample data, perform backpropagation on the selected sub-network.

[0068] In this embodiment of the invention, the training data may include: training sample data and reference sample data corresponding to the training sample data. A single training sample data point and its corresponding reference sample data can be referred to as a set of training data. The following description uses a set of training data to illustrate the training of a hypernetwork:

[0069] The training data can be input into the supernetwork, which can then perform forward computation based on the training samples and output data. Finally, the supernetwork's weights can be adjusted by backpropagating the output data and comparing it with the reference samples from the training data set.

[0070] Assuming the number of possible widths for the hypernet is C, then each module has M (the number of branches in each module) * C different choices, and the entire hypernet has (M * C)N (the number of modules) choices. If N = 20, M = 3, and C = 3, then there are a total of 9... 20 With these options, it can be seen that the hypernetwork space is extremely large. Therefore, in an optional embodiment of the present invention, a subnetwork can be selected from the hypernetwork, and then the selected subnetwork can be trained.

[0071] The process involves inputting training sample data into a selected sub-network for forward computation to obtain the output data of that sub-network; then, based on the output data of the selected sub-network and reference sample data, backpropagation is performed on the selected sub-network. A sub-network can refer to a network containing at least one module with only partial branches. For example... Figure 2B The subnetworks of the hypernetwork can include: Subnetwork 1: (Module 1 - Module 2 - Branch 1 of Module 3 - Module 4); Subnetwork 2: (Module 1 - Module 2 - Branch 31 and Branch 2 of Module 3 - Module 4); Subnetwork 3: (Module 1 - Branch 21 of Module 2 - Branch 31 of Module 3 - Module 4); Subnetwork 4: (Module 1 - Branch 21 and Branch 22 of Module 2 - Branch 31 of Module 3 - Module 4), etc. This reduces the computational cost of training the hypernetwork and further improves the efficiency of constructing the target network.

[0072] Specifically, the definition of the loss function of the hypernetwork in the search space information can be obtained. Then, based on the data output by the selected subnetwork and the reference sample data, as well as the definition of the loss function, the loss function result is calculated. Based on the loss function result, the selected subnetwork is backpropagated.

[0073] In an optional embodiment of the present invention, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the step of selecting a subnetwork from the supernetwork includes: selecting a branch from each module of the supernetwork, and connecting the selected branches from each module in series to form a subnetwork. This can reduce the size of the subnetwork, further reduce the computational load of training the supernetwork, and thus further improve the efficiency of constructing the target network.

[0074] In one example, a branch can be selected from each module of the hypernetwork according to a preset branch selection rule, and the selected branches from each module can be connected in series to form a subnetwork. The preset branch selection rule can be set as needed, such as round-robin selection or random selection, and this embodiment of the invention does not limit it.

[0075] After training the supernetwork, subnetworks can be searched from the trained supernetwork based on the search metric to obtain the target network for performing the target task; this may include the following steps 214 to 218:

[0076] Step 214: Use a search algorithm to search for subnetworks from the trained supernetwork.

[0077] Step 216: Perform performance testing on the sub-network by inputting the test data into the searched sub-network to obtain the performance parameters of the sub-network.

[0078] Step 218: Based on the performance parameters of the subnetworks obtained from the search, select the subnetwork with the best performance that meets the search criteria as the target network.

[0079] In this embodiment of the invention, a subnetwork can first be searched from the trained supernetwork using a search algorithm; then, test data can be input into this subnetwork. After the test data is input into the subnetwork, on the one hand, the subnetwork can perform calculations based on the test data and output results; on the other hand, during the subnetwork's calculations based on the test data, the performance of the subnetwork can be tested to obtain the corresponding performance parameters. The performance of the subnetwork being tested can correspond to the performance indicators in the search metrics; for example, if the search metrics include metrics for computational accuracy and computational speed, then the performance of the subnetwork being tested can include computational accuracy and computational speed. Then, based on the performance parameters of the subnetworks obtained through the search, the subnetwork with the best performance that meets the search metrics can be selected as the target network.

[0080] In one example, when the search algorithm is a random search algorithm, after obtaining the performance parameters of the subnetwork, these parameters can be compared with the corresponding performance indicators in the search metrics. If the performance parameters of the subnetwork meet the corresponding performance indicators in the search metrics, the subnetwork can be retained; then steps 214 to 216 are executed again. If the performance parameters of the subnetwork do not meet the corresponding performance indicators in the search metrics, the subnetwork can be discarded, and then steps 214 to 216 are executed again. When there are multiple subnetworks that meet the corresponding performance parameters and the corresponding performance indicators in the search metrics (i.e., the retained subnetworks), the optimal subnetwork can be selected as the target network. The optimal subnetwork can be the subnetwork with the best overall performance, or it can refer to one or more subnetworks with the best performance; the specific settings can be configured according to user needs, and this embodiment of the invention does not impose any limitations on this.

[0081] In another example, when the search algorithm is an evolutionary search algorithm, after obtaining a subnetwork and its corresponding performance parameters in the first search, the subnetwork and performance parameters obtained in the first search can be retained, and steps 214 to 218 can be executed again. Starting from the second time, the process of executing step 214 can involve recombining and / or mutating the retained subnetwork by searching from the trained supernetwork, generating a new subnetwork. After determining the performance parameters of the new subnetwork, during the execution of step 218, the performance parameters of the newly generated subnetwork can be compared with the performance parameters of the previously generated subnetwork. If the performance parameters of the newly generated subnetwork are better than those of the previously generated subnetwork, the newly generated subnetwork and its corresponding performance parameters can be retained, and steps 214 to 218 can be executed again. If the performance parameters of the previously generated new subnetwork are better than those of the newly generated subnetwork, the previously generated new subnetwork and its corresponding performance parameters can be retained, and steps 214 to 218 can be executed again; this continues until a subnetwork with optimal performance that meets the search criteria is obtained.

[0082] In this embodiment of the invention, the method of searching for subnetworks from the supernetwork each time can be determined according to the search algorithm, and this embodiment of the invention does not limit this.

[0083] In summary, in this embodiment of the invention, during the construction of the supernetwork, the modules can be connected in series and the inputs and outputs of each module can be connected to construct the supernetwork; thereby, networks of different depths can be obtained; better meeting the user's task requirements.

[0084] Secondly, in this embodiment of the invention, during the training of the supernetwork, training sample data can be input into the supernetwork for forward computation to obtain the data output by the supernetwork; then, a subnetwork is selected from the supernetwork, and backpropagation is performed on the subnetwork based on the data output by the supernetwork and the reference sample data; thereby reducing the complexity of training the supernetwork and improving the efficiency of training the supernetwork; thus further improving the efficiency of searching for the target network.

[0085] Furthermore, in this embodiment of the invention, a branch can be selected from each module of the supernetwork, and the selected branch from each module can be connected in series to form a subnetwork; this can reduce the network parameters of the subnetwork, thereby further reducing the complexity of training the supernetwork and improving the efficiency of training the supernetwork; thus further improving the efficiency of searching for the target network.

[0086] Furthermore, in this embodiment of the invention, a search algorithm can be used to search for subnetworks from the trained supernetwork; then, the performance of the subnetworks is tested by inputting the test data into the searched subnetworks to obtain the performance parameters of the subnetworks; then, based on the performance parameters of the searched subnetworks, the subnetwork with the best performance and that meets the search criteria is selected from the searched subnetworks as the target network; thereby, a subnetwork with better performance is searched as the target network, improving the accuracy of data processing in the target network.

[0087] Reference Figure 3 The diagram illustrates a flowchart of an alternative embodiment of the search method of the present invention.

[0088] Step 302: Obtain network construction information corresponding to the target task. The network construction information includes: search space information, sample data, and search metrics.

[0089] Step 304: Construct a supernetwork based on the search space information, and train the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks;

[0090] Step 306: Based on the search metrics, search for subnetworks from the trained hypernetwork to obtain the target network for performing the target task.

[0091] Steps 302 to 306 are similar to steps 202 to 218 above, and will not be repeated here.

[0092] Step 308: Train the target network using the sample data.

[0093] In this embodiment of the invention, after obtaining the target network, the target network can be further trained to improve its accuracy.

[0094] In one example of the present invention, after a web search platform / web search service obtains a target network, it can output the target network; then the user can manually train the target network using sample data; or the target network can be input to other platforms, which can then train the target network using sample data.

[0095] In another example of the present invention, after the network search platform / network search service obtains the target network, it can continue to train the target network using sample data; and after completing the training of the target network, the trained target network is output.

[0096] In summary, in this embodiment of the invention, after the target network is obtained, the sample data can be used to train the target network to improve its accuracy.

[0097] In one optional embodiment of the present invention, after obtaining the target network, if it is necessary to improve the computational speed of the target network, the target network can be accelerated, such as by pruning or quantizing the target network; the embodiments of the present invention do not limit this.

[0098] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0099] Reference Figure 4 The diagram illustrates a structural block diagram of an embodiment of the search device of the present invention, which may specifically include the following modules:

[0100] The acquisition module 402 is used to acquire network construction information corresponding to the target task, the network construction information including: search space information, sample data and search metrics;

[0101] The construction module 404 is used to construct a supernetwork based on the search space information and train the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks;

[0102] Search module 406 is used to search for subnetworks from the trained hypernetwork based on the search metrics to obtain a target network for performing the target task.

[0103] Reference Figure 5 The diagram shows a structural block diagram of an optional embodiment of the search device of the present invention.

[0104] In an optional embodiment of the present invention, the search space information includes: branch construction forms corresponding to multiple modules for constructing the hypernetwork; the construction module 404 includes:

[0105] The information extraction submodule 4042 is used to extract the branch construction form corresponding to each module from the search space information;

[0106] The network module construction submodule 4044 is used to construct each branch of the module according to the branch construction form corresponding to the module for each module; and to connect the branches of the module in parallel to construct the module.

[0107] The network construction submodule 4046 is used to connect the modules in series to construct the supernetwork.

[0108] In an optional embodiment of the present invention, the network construction submodule 4046 is used to connect the modules in series and connect the inputs and outputs of each module to construct the supernetwork.

[0109] In an optional embodiment of the present invention, the sample data includes training data, the training data includes training sample data and reference sample data corresponding to the training sample data, and the construction module 404 includes:

[0110] The forward computation submodule 4048 is used to select a subnetwork from the supernetwork, input the training sample data into the selected subnetwork for forward computation, and obtain the data output by the selected subnetwork.

[0111] The backpropagation submodule 40410 is used to perform backpropagation on the selected subnetwork based on the data output by the selected subnetwork and the reference sample data.

[0112] In an optional embodiment of the present invention, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the forward computation submodule 4048 is used to select a branch from each module of the supernetwork and connect the selected branches from each module in series to form a subnetwork.

[0113] In an optional embodiment of the present invention, the sample data includes test data, and the search module 406 includes:

[0114] The network search submodule 4062 is used to search for subnetworks from the trained supernetwork using a search algorithm;

[0115] The performance testing submodule 4064 is used to perform performance testing on the subnetwork by inputting the test data into the searched subnetwork, and to obtain the performance parameters of the subnetwork.

[0116] The network selection submodule 4066 is used to select the subnetwork with the best performance and that meets the search criteria as the target network based on the performance parameters of the subnetworks obtained from the search.

[0117] In an optional embodiment of the present invention, the apparatus further includes:

[0118] The training module 408 is used to train the target network using the sample data.

[0119] In summary, in this embodiment of the invention, network construction information corresponding to the target task can be obtained. This network construction information includes search space information, sample data, and search metrics. Then, a supernetwork is constructed based on the search space information, and the supernetwork is trained based on the sample data. Finally, subnetworks are searched from the trained supernetwork based on the search metrics to obtain the target network used to perform the target task. Compared to existing technologies that require manual network design, this embodiment of the invention is adaptable to the task and can quickly construct the network.

[0120] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0121] Figure 6 This is a structural block diagram illustrating an electronic device 600 for searching, according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0122] Reference Figure 6 The electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0123] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0124] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of this data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0125] Power component 606 provides power to various components of electronic device 600. Power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.

[0126] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0127] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0128] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0129] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 can detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0130] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 614 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 614 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0131] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0132] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0133] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a search method, the method comprising: acquiring network construction information corresponding to a target task, the network construction information including: search space information, sample data, and search metrics; constructing a supernetwork based on the search space information, and training the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks; and searching for subnetworks from the trained supernetwork based on the search metrics to obtain a target network for performing the target task.

[0134] Optionally, the search space information includes: branch construction forms corresponding to multiple modules for constructing the hypernetwork; constructing the hypernetwork based on the search space information includes: extracting the branch construction forms corresponding to each module from the search space information; constructing each branch of the module according to the branch construction form corresponding to the module for each module; connecting the branches of the module in parallel to construct the module; and connecting the modules in series to construct the hypernetwork.

[0135] Optionally, the step of connecting the modules in series to construct the supernetwork includes: connecting the modules in series and connecting the inputs and outputs of each module to construct the supernetwork.

[0136] Optionally, the sample data includes training data, which includes training sample data and reference sample data corresponding to the training sample data. Training the supernetwork based on the sample data includes: selecting a subnetwork from the supernetwork, inputting the training sample data into the selected subnetwork for forward computation to obtain the data output by the selected subnetwork; and performing backpropagation on the selected subnetwork based on the data output by the selected subnetwork and the reference sample data.

[0137] Optionally, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the step of selecting a subnetwork from the supernetwork includes: selecting a branch from each module of the supernetwork, and connecting the selected branches from each module in series to form a subnetwork.

[0138] Optionally, the sample data includes test data, and the step of searching for subnetworks from the trained supernetwork based on the search metric to obtain the target network includes: using a search algorithm to search for subnetworks from the trained supernetwork; performing performance tests on the subnetworks by inputting the test data into the searched subnetworks to obtain the performance parameters of the subnetworks; and selecting the subnetwork with the best performance that meets the search metric from the searched subnetworks based on the performance parameters of the searched subnetworks as the target network.

[0139] Optionally, the method further includes: training the target network using the sample data.

[0140] Figure 7 This is a schematic diagram illustrating the structure of an electronic device 700 for searching according to another exemplary embodiment of the present invention. The electronic device 700 can be a server, which can vary significantly depending on its configuration or performance. It may include one or more central processing units (CPUs) 722 (e.g., one or more processors) and a memory 732, and one or more storage media 730 (e.g., one or more mass storage devices) for storing application programs 742 or data 744. The memory 732 and storage media 730 can be temporary or persistent storage. The program stored in the storage media 730 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 722 may be configured to communicate with the storage media 730 and execute the series of instruction operations in the storage media 730 on the server.

[0141] The server may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input / output interfaces 758, one or more keyboards 756, and / or one or more operating systems 741, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0142] In an exemplary embodiment, the server is configured to execute one or more programs by one or more central processing units 722, including instructions for performing the following operations: acquiring network construction information corresponding to a target task, the network construction information including: search space information, sample data, and search metrics; constructing a supernetwork based on the search space information, and training the supernetwork based on the sample data, wherein the supernetwork includes multiple subnetworks; and searching for subnetworks from the trained supernetwork based on the search metrics to obtain a target network for performing the target task.

[0143] Optionally, the search space information includes: branch construction forms corresponding to multiple modules for constructing the hypernetwork; constructing the hypernetwork based on the search space information includes: extracting the branch construction forms corresponding to each module from the search space information; constructing each branch of the module according to the branch construction form corresponding to the module for each module; connecting the branches of the module in parallel to construct the module; and connecting the modules in series to construct the hypernetwork.

[0144] Optionally, the step of connecting the modules in series to construct the supernetwork includes: connecting the modules in series and connecting the inputs and outputs of each module to construct the supernetwork.

[0145] Optionally, the sample data includes training data, which includes training sample data and reference sample data corresponding to the training sample data. Training the supernetwork based on the sample data includes: selecting a subnetwork from the supernetwork, inputting the training sample data into the selected subnetwork for forward computation to obtain the data output by the selected subnetwork; and performing backpropagation on the selected subnetwork based on the data output by the selected subnetwork and the reference sample data.

[0146] Optionally, the supernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; the step of selecting a subnetwork from the supernetwork includes: selecting a branch from each module of the supernetwork, and connecting the selected branches from each module in series to form a subnetwork.

[0147] Optionally, the sample data includes test data, and the step of searching for subnetworks from the trained supernetwork based on the search metric to obtain the target network includes: using a search algorithm to search for subnetworks from the trained supernetwork; performing performance tests on the subnetworks by inputting the test data into the searched subnetworks to obtain the performance parameters of the subnetworks; and selecting the subnetwork with the best performance that meets the search metric from the searched subnetworks based on the performance parameters of the searched subnetworks as the target network.

[0148] Optionally, it also includes instructions for performing the following operation: training the target network using the sample data.

[0149] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0150] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0151] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0153] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0154] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0155] The above provides a detailed description of a search method, a search device, and an electronic device provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A search method, characterized in that, include: When a user needs to use a web search platform or web search service to search for a target network for performing a target task, and enters the network construction information corresponding to the target task into the web search platform or web search service, the user obtains the network construction information corresponding to the target task. The target task includes any one of image recognition, image classification, and image segmentation. The network construction information includes: search space information, sample data, and search metrics. The search space information includes various types of information used to construct the hypernetwork, such as the definition of the hypernetwork's input data, the definition of the hypernetwork's output data, the unit construction information of the units in each branch of the hypernetwork, the definition of the hypernetwork's loss function, and the branch construction form of the branches in each module of the hypernetwork. The unit construction information includes the types of convolutional kernels included, the network width of the hypernetwork, and the network depth of the hypernetwork. The sample data includes training sample data and reference sample data corresponding to the training sample data. The search metrics include the performance metrics of the target network, used to search for the target network from the hypernetwork. A hypernetwork is constructed based on the search space information, wherein the hypernetwork includes multiple subnetworks; Select a subnetwork from the supernetwork, input the training sample data into the selected subnetwork for forward computation, and obtain the data output by the selected subnetwork; Based on the data output by the selected sub-network, the reference sample data, and the definition of the loss function, the loss function result is calculated; Based on the loss function results, backpropagation is performed on the selected sub-network; A search algorithm is used to search for subnetworks from the trained supernetwork. The performance parameters of the subnetwork are obtained by inputting the test data from the sample data into the searched subnetwork. Based on the performance parameters of the subnetworks obtained from the search, subnetworks that meet the performance indicators are selected and retained from the searched subnetworks; The currently retained subnetwork and the previously retained subnetwork are recombined and / or mutated to generate a new subnetwork. The subnetwork with the best performance among the new subnetwork and the previously retained subnetwork is taken as the target network. The target network is trained using the sample data, and the trained target network is output. The output target network is deployed to the terminal device, and the image is input to the target network of the terminal device, so that the target network performs the target task; The construction of the hypernetwork based on the search space information includes: Extract the definition of the input data of the hypernetwork from the search space information, and construct the input module based on the definition of the input data; The definition of the output data of the hypernetwork is extracted from the search space information, and an output module is constructed based on the definition of the output data; at least one module is included between the input module and the output module. Extract the branch construction form of each branch in the module and the unit construction information of each unit in each branch of the module from the search space information; For each branch in the module: construct the branch based on its branch construction form and the unit construction information of each unit contained in the branch; The modules are constructed by connecting the branches contained in the module in parallel. Based on the target task, the input module, the output module, and the module are connected in series to construct the supernetwork.

2. The method according to claim 1, characterized in that, The step of connecting the modules in series to construct the supernetwork includes: The supernetwork is constructed by connecting the modules in series and connecting the inputs and outputs of each module.

3. The method according to claim 1, characterized in that, The hypernetwork is composed of multiple modules connected in series, and each module is composed of multiple branches connected in parallel; selecting a subnetwork from the hypernetwork includes: A branch is selected from each module of the supernetwork, and the selected branches are connected in series to form a subnetwork.

4. A search device, characterized in that, include: The acquisition module is used to acquire network construction information corresponding to the target task when a user needs to use a network search platform or network search service to search for a target network for performing a target task, and after the user inputs the network construction information corresponding to the target task in the network search platform or network search service, the target task includes any one of image recognition, image classification and image segmentation. The network construction information includes: search space information, sample data, and search metrics. The search space information includes various information used to construct the hypernetwork, such as the definition of the hypernetwork's input data, the definition of the hypernetwork's output data, the unit construction information of the units in each branch of the hypernetwork, the definition of the hypernetwork's loss function, and the branch construction form of the branches in each module of the hypernetwork. The unit construction information includes the types of convolutional kernels included, the network width of the hypernetwork, and the network depth of the hypernetwork. The sample data includes training sample data and reference sample data corresponding to the training sample data. The search metrics include the performance metrics of the target network, used to search for the target network from the hypernetwork. A construction module is used to construct a hypernetwork based on the search space information, wherein the hypernetwork includes multiple subnetworks; The forward computation submodule is used to select a subnetwork from the supernetwork, input the training sample data into the selected subnetwork for forward computation, and obtain the data output by the selected subnetwork. The backpropagation submodule is used to calculate the loss function result based on the data output by the selected subnetwork, the reference sample data, and the definition of the loss function; and to perform backpropagation on the selected subnetwork based on the loss function result. A network search submodule is used to search for subnetworks from the trained supernetwork using a search algorithm; The performance testing submodule is used to perform performance testing on the subnetwork by inputting the test data from the sample data into the searched subnetwork, and to obtain the performance parameters of the subnetwork. The network selection submodule is used to select and retain subnetworks that meet the performance indicators from the searched subnetworks based on the performance parameters of the subnetworks obtained; to reorganize and / or mutate the currently retained subnetworks and the previously retained subnetworks to generate new subnetworks; and to select the subnetwork with the best performance among the new subnetworks and the previously retained subnetworks as the target network. The training module is used to train the target network using the sample data and output the trained target network. The device is also used to: deploy the output target network to the terminal device, input the image to the target network of the terminal device, and enable the target network to perform the target task; The construction of the hypernetwork based on the search space information includes: Extract the definition of the input data of the hypernetwork from the search space information, and construct the input module based on the definition of the input data; The definition of the output data of the hypernetwork is extracted from the search space information, and an output module is constructed based on the definition of the output data; at least one module is included between the input module and the output module. Extract the branch construction form of each branch in the module and the unit construction information of each unit in each branch of the module from the search space information; For each branch in the module: construct the branch based on its branch construction form and the unit construction information of each unit contained in the branch; The modules are constructed by connecting the branches contained in the module in parallel. Based on the target task, the input module, the output module, and the module are connected in series to construct the supernetwork.

5. An electronic device, characterized in that, Includes memory, and one or more programs, wherein one or more programs are stored in memory and configured to be executed by one or more processors. The one or more programs contain instructions for performing the following operations: When a user needs to use a web search platform or web search service to search for a target network for performing a target task, and enters the network construction information corresponding to the target task into the web search platform or web search service, the user obtains the network construction information corresponding to the target task. The target task includes any one of image recognition, image classification, and image segmentation. The network construction information includes: search space information, sample data, and search metrics. The search space information includes various types of information used to construct the hypernetwork, such as the definition of the hypernetwork's input data, the definition of the hypernetwork's output data, the unit construction information of the units in each branch of the hypernetwork, the definition of the hypernetwork's loss function, and the branch construction form of the branches in each module of the hypernetwork. The unit construction information includes the types of convolutional kernels included, the network width of the hypernetwork, and the network depth of the hypernetwork. The sample data includes training sample data and reference sample data corresponding to the training sample data. The search metrics include the performance metrics of the target network, used to search for the target network from the hypernetwork. A hypernetwork is constructed based on the search space information, wherein the hypernetwork includes multiple subnetworks; Select a subnetwork from the supernetwork, input the training sample data into the selected subnetwork for forward computation, and obtain the data output by the selected subnetwork; Based on the data output by the selected sub-network, the reference sample data, and the definition of the loss function, the loss function result is calculated; Based on the loss function results, backpropagation is performed on the selected sub-network; A search algorithm is used to search for subnetworks from the trained supernetwork. The performance parameters of the subnetwork are obtained by inputting the test data from the sample data into the searched subnetwork. Based on the performance parameters of the subnetworks obtained from the search, subnetworks that meet the performance indicators are selected and retained from the searched subnetworks; The currently retained subnetwork and the previously retained subnetwork are recombined and / or mutated to generate a new subnetwork. The subnetwork with the best performance among the new subnetwork and the previously retained subnetwork is taken as the target network. The target network is trained using the sample data, and the trained target network is output. The output target network is deployed to the terminal device, and the image is input to the target network of the terminal device, so that the target network performs the target task; The construction of the hypernetwork based on the search space information includes: Extract the definition of the input data of the hypernetwork from the search space information, and construct the input module based on the definition of the input data; The definition of the output data of the hypernetwork is extracted from the search space information, and an output module is constructed based on the definition of the output data; at least one module is included between the input module and the output module. Extract the branch construction form of each branch in the module and the unit construction information of each unit in each branch of the module from the search space information; For each branch in the module: construct the branch based on its branch construction form and the unit construction information of each unit contained in the branch; The modules are constructed by connecting the branches contained in the module in parallel. Based on the target task, the input module, the output module, and the module are connected in series to construct the supernetwork.

6. A readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the search method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Neural network structure evaluation method and device, neural network structure determination method and device and storage medium

    CN110929867A

  • Neural network structure searching method and neural network structure searching device

    CN111382868A

  • Method and device for generating neural network model

    CN111582453A

  • Neural network construction method and device

    CN111931901A