Network model generation method, device and electronic equipment
By obtaining and utilizing the actual performance parameters of preset subnets on the terminal device, a target network model that meets specific conditions is designed, which solves the problem of poor network model effect in the prior art and improves the use effect on the terminal device.
Patent Information
- Application Number
- CN202011406267.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-03
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-12-03
AI Technical Summary
The network model searched through automatic model search algorithm in the prior art is not designed for specific terminal devices, resulting in poor use of the searched network model.
By obtaining the actual performance parameters of multiple preset subnets running on the terminal device, and determining at least one network model based on these parameters, the operation information of the target network model meets specific preset conditions, including predicted performance parameters when running on the terminal device, To design a network model suitable for each terminal device.
It improves the effectiveness of network models on terminal devices, ensuring that the model can operate normally on terminal devices with limited computing capabilities, especially in voice tasks to meet real-time rate requirements.
Smart Images

Figure CN112381214B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a network model generation method, device and electronic equipment. Background Art
[0002] With the development of artificial intelligence technology, deep learning has achieved good results in many application fields. In deep learning, the structure of the network has a very important impact on the effect of the model. Manually designing a network model requires a lot of experience and multiple attempts, which is costly.
[0003] Currently, the network model can be searched through an automatic model search algorithm. However, the network model searched through the automatic model search algorithm is not designed for a specific terminal device, resulting in poor use effect of the searched network model. Summary of the invention
[0004] The embodiments of the present disclosure provide a network model generation method, device and electronic device to solve the problem in the prior art that the network model searched out by the automatic model search algorithm is not designed for a specific terminal device, resulting in poor use effect of the searched network model.
[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0006] In a first aspect, an embodiment of the present disclosure provides a method for generating a network model, the method comprising:
[0007] Obtaining actual performance parameters of each of the plurality of preset subnetworks running on the terminal device;
[0008] Determine at least one network model based on the plurality of preset sub-networks, each network model in the at least one network model includes at least one preset sub-network in the plurality of preset sub-networks;
[0009] A target network model is determined based on operation information of each network model, wherein the operation information of the target network model satisfies a first preset condition, wherein the operation information includes predicted performance parameters of each network model when running on the terminal device, and wherein the predicted performance parameters are determined based on actual performance parameters corresponding to a preset subnetwork included in each network model.
[0010] In a second aspect, an embodiment of the present disclosure provides a network model generation device, the device comprising:
[0011] An acquisition module, used to acquire actual performance parameters of each preset sub-network among a plurality of preset sub-networks running on a terminal device;
[0012] A first determining module, configured to determine at least one network model based on the plurality of preset sub-networks, each of the at least one network model including at least one preset sub-network among the plurality of preset sub-networks;
[0013] The second determination module is used to determine the target network model based on the operation information of each network model, the operation information of the target network model meets the first preset condition, the operation information includes the predicted performance parameters of each network model when running on the terminal device, and the predicted performance parameters are determined based on the actual performance parameters corresponding to the preset subnetwork included in each network model.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps in the network model generation method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the network model generation method described in the first aspect are implemented.
[0016] In the embodiment of the present application, the actual performance parameters of each preset subnetwork in a plurality of preset subnetworks running on the terminal device are obtained; at least one network model is determined based on the plurality of preset subnetworks, each of the at least one network model includes at least one preset subnetwork in the plurality of preset subnetworks; the target network model is determined based on the operation information of each network model, the operation information of the target network model satisfies the first preset condition, the operation information includes the predicted performance parameters of each network model when running on the terminal device, and the predicted performance parameters are determined based on the actual performance parameters corresponding to the preset subnetworks included in each network model. In this way, when designing the network model, a network model for each terminal device can be specifically designed based on the terminal device, and a network model that is more suitable for each terminal device can be designed, thereby improving the use effect of the searched network model on the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the description of the embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1is a flow chart of a network model generation method provided by an embodiment of the present disclosure;
[0019] Figure 2 It is one of the structural schematic diagrams of a network model generating device provided by an embodiment of the present disclosure;
[0020] Figure 3 This is a second structural diagram of a network model generating device provided by an embodiment of the present disclosure;
[0021] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] In the embodiments of the present disclosure, electronic devices include but are not limited to mobile phones, tablet computers, laptop computers, PDAs, vehicle-mounted mobile terminals, wearable devices, and pedometers.
[0024] See also Figure 1 , Figure 1 is a flow chart of a network model generation method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the following steps are included:
[0025] Step 101: Acquire actual performance parameters of each preset subnetwork among a plurality of preset subnetworks running on a terminal device.
[0026] Among them, the multiple preset subnetworks can all be different subnetworks. The multiple preset subnetworks can all be convolution modules. For example, the multiple preset subnetworks can be multiple standard convolution modules, and the multiple standard convolution modules can include: 3x3 dw (depthwise) convolution module, 5x5 dw convolution module, 7x7 dw convolution module, 1x1dw convolution module, 3x3mbnet (mobilenet) module, 5x5mbnet module, 7x7mbnet module, 3x3shufflenet (shufflenet) module, 5x5shufflenet module and 7x7shufflenet module. In order to further expand the preset subnetwork, each of the above-mentioned multiple standard convolution modules can set a standard convolution module with multiple different convolution step sizes, for example, each standard convolution module can set two different convolution step sizes of stride1 and stride2. Taking a 3x3 dw convolution module as an example, the multiple preset sub-networks may include 3x3 dw convolution modules with two different convolution steps, stride1 and stride2.
[0027] In addition, the actual performance parameter may include a calculation amount or other parameters that can be used to characterize the operating performance of the preset sub-network, and the calculation amount may be the calculation time when the preset sub-network is running on the terminal device. For example, for a given terminal device and an acceleration code, the actual performance parameter of each preset sub-network may be measured on the terminal device. The acceleration code may be an executable code for accelerating the calculation speed of the preset sub-network.
[0028] Taking the actual performance parameter as the computing amount as an example, in actual applications, due to the different device types of terminal devices and the different acceleration codes running on each terminal device, the computing amount of the network model running on the terminal device is difficult to predict. This embodiment fixes the terminal device and the acceleration code, so that the computing amount corresponding to the measured preset subnetwork can be considered to be the actual computing amount, which is more accurate than the estimated value.
[0029] Step 102: Determine at least one network model based on the multiple preset sub-networks, each of the at least one network model including at least one preset sub-network among the multiple preset sub-networks.
[0030] Among them, multiple network models can be generated based on the multiple preset sub-networks, the multiple network models are trained respectively, the network parameters of the multiple network models are determined respectively, and the second loss value corresponding to each of the network models is obtained, and at least one network model is determined from the multiple network models based on the second loss value corresponding to each of the multiple network models. Each of the multiple network models includes at least one preset sub-network among the multiple preset sub-networks.
[0031] Step 103: determine the target network model based on the operation information of each network model, the operation information of the target network model satisfies a first preset condition, the operation information includes predicted performance parameters of each network model when running on the terminal device, and the predicted performance parameters are determined based on actual performance parameters corresponding to a preset subnetwork included in each network model.
[0032] Among them, the network model with the smallest predicted performance parameter can be determined as the target network model; or, the operation information also includes a first loss value, and the network model with the predicted performance parameter that meets the second preset condition and has the smallest first loss value can be determined as the target network model; or, it is also possible to determine a comprehensive measurement parameter based on the predicted performance parameter and the first loss value, and determine the network model with the smallest comprehensive measurement parameter as the target network model; or, it is also possible to determine the network model with the predicted performance parameter that meets the second preset condition and has the smallest comprehensive measurement parameter as the target network model. This embodiment does not limit the first preset condition.
[0033] In addition, the predicted performance parameter may be the sum of the actual performance parameters corresponding to the preset subnetworks included in each network model, or the predicted performance parameter may also be the sum of the products of the actual performance parameters corresponding to the preset subnetworks included in each network model and the preset coefficients corresponding to each preset subnetwork. For example, the network model includes a 5x5 dw convolution module and a 7x7 dw convolution module, the actual performance parameter corresponding to the 5x5 dw convolution module is a1 microsecond, and the actual performance parameter corresponding to the 7x7 dw convolution module is a2 microsecond, then the predicted performance parameter corresponding to the network model may be: a1+a2.
[0034] It should be noted that the network model searched out by the automatic model search algorithm in the prior art has poor operating effect when running on the terminal device. Due to the limited computing power of the terminal device, the network model running on the terminal device needs to meet the limitation of the computing amount. The network model searched out in the prior art usually has a theoretical computing amount that meets the demand, but the actual computing amount has a large deviation. In particular, for voice tasks on terminal devices, voice tasks need to meet the real-time rate requirements. When the computing amount of the network model cannot meet the real-time rate, the searched network model cannot be used normally on the terminal device. In addition, the computing amount of the network model on the terminal device is affected by many factors, and the computing amount of the network model is different for different types of terminal devices. In this embodiment, the optimal network model suitable for different types of terminal devices can be searched based on the computing power of different types of terminal devices.
[0035] In the embodiment of the present application, the actual performance parameters of each preset subnetwork in a plurality of preset subnetworks running on the terminal device are obtained; at least one network model is determined based on the plurality of preset subnetworks, each of the at least one network model includes at least one preset subnetwork in the plurality of preset subnetworks; the target network model is determined based on the operation information of each network model, the operation information of the target network model satisfies the first preset condition, the operation information includes the predicted performance parameters of each network model when running on the terminal device, and the predicted performance parameters are determined based on the actual performance parameters corresponding to the preset subnetworks included in each network model. In this way, when designing the network model, a network model for each terminal device can be specifically designed based on the terminal device, and a network model that is more suitable for each terminal device can be designed, thereby improving the use effect of the searched network model on the terminal device.
[0036] Optionally, the operation information further includes a first loss value, and the determining the target network model from the at least one network model based on the operation information of each network model includes:
[0037] Performing time series training on each of the network models respectively to obtain a first loss value corresponding to each of the network models;
[0038] A target network model is determined from the at least one network model based on the predicted performance parameter and the first loss value corresponding to each network model.
[0039] Among them, the first loss value can be the loss of each network model on the validation set for time series training (sequence-training). The determination of the target network model from the at least one network model based on the prediction performance parameter corresponding to each network model and the first loss value can be to calculate the comprehensive measurement parameter P of each network model in the at least one network model, where P is: a1*loss+a2*cal, a1 and a2 are preset coefficients, loss is the first loss value corresponding to each network model, cal is the prediction performance parameter corresponding to each network model, and the network model with the smallest comprehensive measurement parameter P is selected as the target network model. In this way, the network model with the smallest first loss value and prediction performance parameter can be used as the final model.
[0040] Alternatively, the target network model is determined from the at least one network model based on the predicted performance parameter and the first loss value corresponding to each network model, and it can also be that among the network models whose predicted performance parameters meet the second preset condition, the network model with the smallest first loss value is selected as the target network model; or it can also be that among the network models whose predicted performance parameters meet the second preset condition, the network model with the smallest comprehensive measurement parameter P is selected as the target network model, so that the selected target network model can save resources of the terminal device. This embodiment is not limited to this.
[0041] In this implementation, each network model in the at least one network model is trained using voice samples, and a target network model is determined from the at least one network model based on the predicted performance parameters and the first loss value corresponding to each network model, so that the determined target network model can be more accurate when performing voice tasks, and the searched network model is particularly suitable for the field of artificial intelligence technology.
[0042] Optionally, the determining at least one network model based on the multiple preset sub-networks includes:
[0043] Generate multiple network models based on the multiple preset sub-networks;
[0044] Training the multiple network models respectively, determining the network parameters of the multiple network models respectively, and obtaining a second loss value corresponding to each of the network models;
[0045] At least one network model is determined from the plurality of network models based on a second loss value corresponding to each of the plurality of network models.
[0046] Wherein, each of the multiple network models can be formed by connecting some sub-networks in the preset sub-network. In the process of training the multiple network models, the network model can be verified using samples in the verification set, and the second loss value can be the loss of the network model on the verification set.
[0047] In addition, the determining of at least one network model from the multiple network models based on the second loss value corresponding to each network model in the multiple network models may be to sort the multiple network models from small to large according to the second loss value and select at least one network model with a front order; or, at least one network model whose second loss value is less than the first preset value may be selected from the multiple network models. This embodiment is not limited to this.
[0048] It should be noted that a super network can be constructed based on the multiple preset sub-networks, and the super network can be trained. In the process of training the super network, multiple network models are generated based on the super network search, and the predicted performance parameters of each network model in the multiple network models when running on the terminal device meet the second preset condition. After the super network is trained, at least one network model with a smaller second loss value can be selected from the multiple network models.
[0049] In this implementation, at least one network model is determined from the multiple network models according to the second loss value corresponding to each network model in the multiple network models, so that a network model with better robustness and stronger prediction ability for new data can be selected, and then the target network model is determined among the selected network models, so that a network model that is more suitable for the terminal device can be determined from two dimensions: the actual operating effect on the terminal device and the model's own performance.
[0050] Optionally, the generating a plurality of network models based on the plurality of preset sub-networks includes:
[0051] Building a super network based on the multiple preset sub-networks;
[0052] A plurality of network models are generated based on the super network, and a predicted performance parameter of each network model in the plurality of network models when running on the terminal device satisfies a second preset condition.
[0053] Wherein, the super network may be composed of the plurality of preset sub-networks. For example, the super network may be composed of a plurality of nodes and arcs, each arc represents a candidate operation, and each node is a preset sub-network. In the process of determining the target network model based on the super network search, an arc between every two nodes is sampled in each iteration to generate a network model from the plurality of network models. The network model may be generated by random sampling.
[0054] It should be noted that, for the network model generated by sampling, the predicted performance parameters can be determined by querying the actual performance parameters corresponding to the preset subnetwork included in each network model, removing the network model whose predicted performance parameters do not meet the second preset condition, and re-sampling until the sampled network model meets the second preset condition, and then training the network model that meets the second preset condition. The multiple network models can be generated by multiple iterations.
[0055] In addition, the second preset condition may be that the predicted performance parameter is less than a second preset value, or may be that the predicted performance parameter is within a preset range. Taking the predicted performance parameter as the predicted calculation amount as an example, the second preset condition may be that the predicted calculation amount is between 1000 microseconds and 2000 microseconds.
[0056] In this implementation, multiple network models whose predicted performance parameters when running on the terminal device meet the second preset condition are generated based on the supernetwork, and a target network model is determined from the multiple generated network models, so that the target network model can achieve predicted performance parameters when running on the terminal device that meet the second preset condition. By giving predicted performance parameter limitations during model search, it can be ensured to a large extent that the determined target network model has a better operating effect on the terminal device.
[0057] Optionally, the multiple network models include a first network model and a second network model, and the first network model and the second network model include the same partial network;
[0058] The training of the plurality of network models respectively and determining the network parameters of the plurality of network models respectively include:
[0059] Training the first network model to determine network parameters in the first network model;
[0060] The second network model is trained using the network parameters of the partial network in the first network model to determine the network parameters in the second network model.
[0061] The first network model and the second network model include the same partial network, and may be that the first network model and the second network model include the same at least one preset sub-network, and the connection relationship between the at least one preset sub-network is the same.
[0062] In this implementation, during the training process, for multiple network models having the same partial network, the network parameters of the same partial network can be reused, thereby improving the search speed of the network model.
[0063] See also Figure 2 , Figure 2 is one of the structural diagrams of a network model generating device provided by an embodiment of the present disclosure, such as Figure 2 As shown, the network model generating device 200 includes:
[0064] An acquisition module 201 is used to acquire actual performance parameters of each preset sub-network among a plurality of preset sub-networks running on a terminal device;
[0065] A first determining module 202, configured to determine at least one network model based on the plurality of preset sub-networks, each of the at least one network model including at least one preset sub-network among the plurality of preset sub-networks;
[0066] The second determination module 203 is used to determine the target network model based on the operation information of each network model, the operation information of the target network model meets the first preset condition, the operation information includes the predicted performance parameters of each network model when running on the terminal device, and the predicted performance parameters are determined based on the actual performance parameters corresponding to the preset subnetwork included in each network model.
[0067] Optionally, the operation information further includes a first loss value, and the second determining module 203 is specifically configured to:
[0068] Performing time series training on each of the network models respectively to obtain a first loss value corresponding to each of the network models;
[0069] A target network model is determined from the at least one network model based on the predicted performance parameter and the first loss value corresponding to each network model.
[0070] Optional, such as Figure 3 As shown, the first determining module 202 includes:
[0071] A generating unit 2021, configured to generate a plurality of network models based on the plurality of preset sub-networks;
[0072] An acquisition unit 2022 is used to train the multiple network models respectively, determine the network parameters of the multiple network models respectively, and acquire a second loss value corresponding to each of the network models;
[0073] The determining unit 2023 is configured to determine at least one network model from the multiple network models based on the second loss value corresponding to each network model in the multiple network models.
[0074] Optionally, the generating unit 2021 is specifically used for:
[0075] Building a super network based on the multiple preset sub-networks;
[0076] A plurality of network models are generated based on the super network, and a predicted performance parameter of each network model in the plurality of network models when running on the terminal device satisfies a second preset condition.
[0077] Optionally, the multiple network models include a first network model and a second network model, and the first network model and the second network model include the same partial network;
[0078] The acquisition unit 2022 is further specifically used for:
[0079] Training the first network model to determine network parameters in the first network model;
[0080] The second network model is trained using the network parameters of the partial network in the first network model to determine the network parameters in the second network model.
[0081] The network model generation device can realize Figure 1 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0082] See also Figure 4 , Figure 4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Figure 4 As shown, the electronic device 300 includes: a memory 302, a processor 301, and a program stored in the memory 302 and executable on the processor 301, wherein:
[0083] The processor 301 reads the program in the memory 302 to execute:
[0084] Obtaining actual performance parameters of each of the plurality of preset subnetworks running on the terminal device;
[0085] Determine at least one network model based on the plurality of preset sub-networks, each network model in the at least one network model includes at least one preset sub-network in the plurality of preset sub-networks;
[0086] A target network model is determined based on operation information of each network model, wherein the operation information of the target network model satisfies a first preset condition, wherein the operation information includes predicted performance parameters of each network model when running on the terminal device, and wherein the predicted performance parameters are determined based on actual performance parameters corresponding to a preset subnetwork included in each network model.
[0087] Optionally, the operation information further includes a first loss value, and the processor 301 determines the target network model from the at least one network model based on the operation information of each network model, including:
[0088] Performing time series training on each of the network models respectively to obtain a first loss value corresponding to each of the network models;
[0089] A target network model is determined from the at least one network model based on the predicted performance parameter and the first loss value corresponding to each network model.
[0090] Optionally, the determining of at least one network model based on the multiple preset sub-networks performed by the processor 301 includes:
[0091] Generate multiple network models based on the multiple preset sub-networks;
[0092] Training the multiple network models respectively, determining the network parameters of the multiple network models respectively, and obtaining a second loss value corresponding to each of the network models;
[0093] At least one network model is determined from the plurality of network models based on a second loss value corresponding to each of the plurality of network models.
[0094] Optionally, the generating of multiple network models based on the multiple preset sub-networks performed by the processor 301 includes:
[0095] Building a super network based on the multiple preset sub-networks;
[0096] A plurality of network models are generated based on the super network, and a predicted performance parameter of each network model in the plurality of network models when running on the terminal device satisfies a second preset condition.
[0097] Optionally, the multiple network models include a first network model and a second network model, and the first network model and the second network model include the same partial network;
[0098] The processor 301 performs the training of the plurality of network models respectively and determines the network parameters of the plurality of network models respectively, including:
[0099] Training the first network model to determine network parameters in the first network model;
[0100] The second network model is trained using the network parameters of the partial network in the first network model to determine the network parameters in the second network model.
[0101] exist Figure 4In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 301 and memory represented by memory 302. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface.
[0102] The processor 301 is responsible for managing the bus architecture and general processing, and the memory 302 can store data used by the processor 301 when performing operations.
[0103] It should be noted that any implementation method in the method embodiment of the disclosed embodiment can be implemented by the above-mentioned electronic device in this embodiment and achieve the same beneficial effects, which will not be repeated here.
[0104] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned network model generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0105] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure.
[0107] The embodiments of the present disclosure are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A network model generation method, characterized in that: The method comprises: Obtaining actual performance parameters of each of the plurality of preset subnetworks running on the terminal device; Determine at least one network model based on the plurality of preset sub-networks, each network model in the at least one network model includes at least one preset sub-network in the plurality of preset sub-networks; Determining a target network model based on operation information of each network model, wherein the operation information of the target network model satisfies a first preset condition, wherein the operation information includes predicted performance parameters of each network model when it is run on the terminal device, and the predicted performance parameters are determined based on actual performance parameters corresponding to a preset subnetwork included in each network model; The determining at least one network model based on the multiple preset sub-networks includes: Generate multiple network models based on the multiple preset sub-networks; Training the multiple network models respectively, determining the network parameters of the multiple network models respectively, and obtaining a second loss value corresponding to each of the network models; Determine at least one network model from the plurality of network models based on a second loss value corresponding to each network model in the plurality of network models; The generating a plurality of network models based on the plurality of preset sub-networks comprises: Building a super network based on the multiple preset sub-networks; A plurality of network models are generated based on the super network, and a predicted performance parameter of each network model in the plurality of network models when running on the terminal device satisfies a second preset condition.
2. The method according to claim 1, characterized in that The operation information further includes a first loss value, and determining a target network model from the at least one network model based on the operation information of each network model includes: Performing time series training on each of the network models respectively to obtain a first loss value corresponding to each of the network models; A target network model is determined from the at least one network model based on the predicted performance parameter and the first loss value corresponding to each network model.
3. The method according to claim 1, characterized in that: The plurality of network models include a first network model and a second network model, wherein the first network model and the second network model include the same partial network; The training of the plurality of network models respectively and determining the network parameters of the plurality of network models respectively include: Training the first network model to determine network parameters in the first network model; The second network model is trained using the network parameters of the partial network in the first network model to determine the network parameters in the second network model.
4. A network model generation device, characterized in that: The device comprises: An acquisition module, used to acquire actual performance parameters of each preset sub-network among a plurality of preset sub-networks running on a terminal device; A first determining module, configured to determine at least one network model based on the plurality of preset sub-networks, each of the at least one network model including at least one preset sub-network among the plurality of preset sub-networks; A second determination module is used to determine a target network model based on operation information of each network model, wherein the operation information of the target network model satisfies a first preset condition, wherein the operation information includes a predicted performance parameter of each network model when it is run on the terminal device, and the predicted performance parameter is determined based on an actual performance parameter corresponding to a preset subnetwork included in each network model; The first determining module comprises: A generating unit, configured to generate a plurality of network models based on the plurality of preset sub-networks; An acquisition unit, used to train the multiple network models respectively, determine the network parameters of the multiple network models respectively, and acquire a second loss value corresponding to each of the network models; a determining unit, configured to determine at least one network model from the plurality of network models based on a second loss value corresponding to each of the plurality of network models; The generating unit is specifically used for: Building a super network based on the multiple preset sub-networks; A plurality of network models are generated based on the super network, and a predicted performance parameter of each network model in the plurality of network models when running on the terminal device satisfies a second preset condition.
5. The device according to claim 4, characterized in that The operation information further includes a first loss value, and the second determination module is specifically configured to: Performing time series training on each of the network models respectively to obtain a first loss value corresponding to each of the network models; A target network model is determined from the at least one network model based on the predicted performance parameter and the first loss value corresponding to each network model.
6. The device according to claim 4, characterized in that The plurality of network models include a first network model and a second network model, wherein the first network model and the second network model include the same partial network; The acquisition unit is further specifically used for: Training the first network model to determine network parameters in the first network model; The second network model is trained using the network parameters of the partial network in the first network model to determine the network parameters in the second network model.
7. An electronic device, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps in the network model generation method as described in any one of claims 1 to 3 are implemented.
