Model and data joint optimization method and related device
Patent Information
- Application Number
- CN202010480670.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-05-30
AI Technical Summary
In the existing artificial intelligence application design process, automatic machine learning algorithms can only be optimized based on the initial data set or initial model, and cannot obtain a better model structure and a more efficient training data set at the same time, resulting in low design efficiency.
Through a joint optimization method of model and data, an automatic machine learning algorithm is used to jointly optimize the model and data based on the initial data set, achieving alternate iterations of the optimized model and the optimized data set until the preset conditions are reached and a better model structure is obtained. and more efficient training data sets.
It improves the efficiency of artificial intelligence application design, achieves simultaneous optimization of model structure and training data set, and improves the efficiency and effect of the design process.
Smart Images

Figure CN113742991B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model and data joint optimization method and related devices. Background Art
[0002] With the rapid development of artificial intelligence, artificial intelligence is widely used in various fields. As the demand for artificial intelligence applications increases, the artificial intelligence application design process needs to be optimized to meet application needs.
[0003] In the current AI application design process, optimization can be performed through automated machine learning (AutoML) algorithms. The AutoML model optimization technology can be used to automatically optimize the model, but the model optimization process can only be based on the initial data set, and the data cannot be optimized. Alternatively, the AutoML data optimization technology can be used to obtain a better training data set, but the data optimization process can only be based on the initial model, and the model cannot be optimized. In this way, in the AI application design process, it is impossible to simultaneously obtain a better model structure and a more efficient training data set, resulting in low design efficiency. Summary of the invention
[0004] The present application provides a model and data joint optimization method and related devices, which can simultaneously obtain a better model structure and a more efficient training data set, thereby improving the efficiency of artificial intelligence application design.
[0005] In a first aspect, the present application provides a model and data joint optimization method, comprising:
[0006] Obtain an initial data set I;
[0007] Based on the initial data set I, the model and data are jointly optimized through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0008] In the above method, in the process of artificial intelligence application design, based on the initial data set, the model and data are jointly optimized through the automatic machine learning algorithm to obtain the optimized model and the optimized data set, thereby achieving the simultaneous acquisition of a better model structure and a more efficient training data set, thereby improving the efficiency of artificial intelligence application design.
[0009] In combination with the first aspect, in a possible implementation of the first aspect, based on the initial data set I, the joint optimization of the model and the data is performed by an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization, including the following steps:
[0010] S1: Based on the data set I(t), the optimized model M(t+1) is obtained through automatic model optimization;
[0011] S2: Based on the model M(t+1) and the data set I(t), an optimized data set I(t+1) is obtained through automatic data optimization;
[0012] S3: Determine whether the joint optimization is finished. If not, execute step S4. If finished, execute step S5.
[0013] S4: Let t=t+1, and repeat steps S1 to S3;
[0014] S5: Determine the model M(t+1) as the optimized model, and determine the data set I(t+1) as the optimized data set;
[0015] The initial value of t is 0. When t=0, the data set I(t) is the initial data set I.
[0016] In combination with the first aspect, in a possible implementation of the first aspect, the optimized model M(t+1) is obtained by automatic model optimization based on the data set I(t), including:
[0017] Based on the data set I(t), the model M(t+1) is obtained by automatic model structure search;
[0018] Alternatively, based on the data set I(t), a first model is obtained through automatic model structure search, and the first model is automatically compressed to obtain the model M(t+1).
[0019] In combination with the first aspect, in a possible implementation of the first aspect, before performing joint optimization of the model and the data by an automatic machine learning algorithm based on the initial data set I to obtain an optimized model and an optimized data set after joint optimization, the method further includes:
[0020] Get the initial model M.
[0021] In combination with the first aspect, in a possible implementation of the first aspect, the optimized model M(t+1) is obtained by automatic model optimization based on the data set I(t), including:
[0022] Based on the data set I(t), the model M(t) is automatically compressed to obtain the model M(t+1), wherein when t=0, the model M(t) is the initial model M.
[0023] In combination with the first aspect, in a possible implementation of the first aspect, the automatic model optimization includes automatic hyperparameter search.
[0024] In combination with the first aspect, in a possible implementation of the first aspect, the step of obtaining an optimized data set I(t+1) by automatic data optimization based on the model M(t+1) and the data set I(t) includes:
[0025] Based on the model M(t+1), automatic data enhancement search and / or automatic data validity search is performed on the data set I(t) to obtain the data set I(t+1).
[0026] In combination with the first aspect, in a possible implementation of the first aspect, before obtaining the optimized model M(t+1) by automatic model optimization based on the data set I(t), the method further includes:
[0027] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0028] In combination with the first aspect, in a possible implementation manner of the first aspect, determining whether the joint optimization is finished includes:
[0029] Obtaining a first model index of the model M(t+1) and / or performing a first number of repetitions of steps S1 to S3;
[0030] If the first model indicator meets a first preset requirement and / or the first repetition number reaches a first preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0031] In combination with the first aspect, in a possible implementation of the first aspect, based on the initial data set I, the joint optimization of the model and the data is performed by an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization, including the following steps:
[0032] S1: Based on the data set I(k, j), n optimized models are obtained through automatic model optimization, wherein the n models include model M(k+1, j+1), model M(k+1, j+2), ..., model M(k+1, j+n), where n is a positive integer;
[0033] S2: Based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, wherein the n data sets include data set I(k+1, j+1), data set I(k+1, j+2), ..., data set I(k+1, j+n), and the n models correspond to the n data sets one by one;
[0034] S3: Obtain the best model M(k+1, j+w) among the n models, and obtain a data set I(k+1, j+w) corresponding to the model M(k+1, j+w) among the n data sets, where w is a positive integer not greater than n;
[0035] S4: Determine whether the joint optimization is finished. If not, execute step S5. If finished, execute step S6.
[0036] S5: Let k=k+1, j=j+w, and repeat steps S1 to S4;
[0037] S6: Determine the model M(k+1, j+w) as the optimized model, and determine the data set I(k+1, j+w) as the optimized data set;
[0038] Among them, the initial value of k is 0, the initial value of j is 0, when k=0, j=0, the data set I(k, j) is the initial data set I.
[0039] In combination with the first aspect, in a possible implementation of the first aspect, the step of obtaining the optimized n models through automatic model optimization based on the data set I(k, j) includes:
[0040] Based on the data set I(k, j), obtaining the n models through automatic model structure search;
[0041] Alternatively, based on the data set I(k, j), n second models are obtained through automatic model structure search, and automatic model compression is performed on the n second models respectively to obtain the n models.
[0042] In combination with the first aspect, in a possible implementation of the first aspect, the step of obtaining the optimized n data sets by automatic data optimization based on the n models and the data set I(k, j) includes:
[0043] Based on the n models respectively, automatic data enhancement search and / or automatic data validity search are performed on the data set I(k, j) to obtain the n data sets.
[0044] In combination with the first aspect, in a possible implementation of the first aspect, before obtaining the optimized n models through automatic model optimization based on the data set I(k, j), the method further includes:
[0045] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0046] In combination with the first aspect, in a possible implementation manner of the first aspect, determining whether the joint optimization is finished includes:
[0047] Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4;
[0048] If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0049] In a second aspect, the present application provides a model and data joint optimization device, comprising:
[0050] An acquisition module, used to acquire an initial data set I;
[0051] The joint optimization module is used to perform joint optimization of the model and data based on the initial data set I through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0052] In the above-mentioned device, in the process of artificial intelligence application design, based on the initial data set, the model and data are jointly optimized through the automatic machine learning algorithm to obtain the optimized model and the optimized data set, thereby achieving the simultaneous acquisition of a better model structure and a more efficient training data set, thereby improving the efficiency of artificial intelligence application design.
[0053] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically configured to perform the following steps:
[0054] S1: Based on the data set I(t), the optimized model M(t+1) is obtained through automatic model optimization;
[0055] S2: Based on the model M(t+1) and the data set I(t), an optimized data set I(t+1) is obtained through automatic data optimization;
[0056] S3: Determine whether the joint optimization is finished. If not, execute step S4. If finished, execute step S5.
[0057] S4: Let t=t+1, and repeat steps S1 to S3;
[0058] S5: Determine the model M(t+1) as the optimized model, and determine the data set I(t+1) as the optimized data set;
[0059] The initial value of t is 0. When t=0, the data set I(t) is the initial data set I.
[0060] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0061] Based on the data set I(t), the model M(t+1) is obtained by automatic model structure search;
[0062] Alternatively, based on the data set I(t), a first model is obtained through automatic model structure search, and the first model is automatically compressed to obtain the model M(t+1).
[0063] In combination with the second aspect, in a possible implementation manner of the second aspect, the acquisition module is further used to:
[0064] Get the initial model M.
[0065] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0066] Based on the data set I(t), the model M(t) is automatically compressed to obtain the model M(t+1), wherein when t=0, the model M(t) is the initial model M.
[0067] In combination with the second aspect, in a possible implementation of the second aspect, the automatic model optimization includes automatic hyperparameter search.
[0068] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0069] Based on the model M(t+1), automatic data enhancement search and / or automatic data validity search is performed on the data set I(t) to obtain the data set I(t+1).
[0070] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is further used to:
[0071] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0072] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0073] Obtaining a first model index of the model M(t+1) and / or performing a first number of repetitions of steps S1 to S3;
[0074] If the first model indicator meets a first preset requirement and / or the first repetition number reaches a first preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0075] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically configured to perform the following steps:
[0076] S1: Based on the data set I(k, j), n optimized models are obtained through automatic model optimization, wherein the n models include model M(k+1, j+1), model M(k+1, j+2), ..., model M(k+1, j+n), where n is a positive integer;
[0077] S2: Based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, wherein the n data sets include data set I(k+1, j+1), data set I(k+1, j+2), ..., data set I(k+1, j+n), and the n models correspond to the n data sets one by one;
[0078] S3: Obtain the best model M(k+1, j+w) among the n models, and obtain a data set I(k+1, j+w) corresponding to the model M(k+1, j+w) among the n data sets, where w is a positive integer not greater than n;
[0079] S4: Determine whether the joint optimization is finished. If not, execute step S5. If finished, execute step S6.
[0080] S5: Let k=k+1, j=j+w, and repeat steps S1 to S4;
[0081] S6: Determine the model M(k+1, j+w) as the optimized model, and determine the data set I(k+1, j+w) as the optimized data set;
[0082] Among them, the initial value of k is 0, the initial value of j is 0, when k=0, j=0, the data set I(k, j) is the initial data set I.
[0083] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0084] Based on the data set I(k, j), obtaining the n models through automatic model structure search;
[0085] Alternatively, based on the data set I(k, j), n second models are obtained through automatic model structure search, and automatic model compression is performed on the n second models respectively to obtain the n models.
[0086] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0087] Based on the n models respectively, automatic data enhancement search and / or automatic data validity search are performed on the data set I(k, j) to obtain the n data sets.
[0088] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is further used to:
[0089] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0090] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the joint optimization module is specifically used to:
[0091] Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4;
[0092] If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0093] In a third aspect, the present application provides a model and data joint optimization device, comprising a processor and a memory. When the processor executes computer instructions stored in the memory, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0094] In a fourth aspect, the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed by a processor, the processor executes the method in the first aspect or any possible implementation of the first aspect.
[0095] In a fifth aspect, the present application provides a computer program product, comprising computer instructions, which, when executed on a recommendation device, causes the recommendation device to execute the method in the first aspect or any possible implementation of the first aspect.
[0096] In a sixth aspect, the present application provides a model and data joint optimization method, characterized by comprising:
[0097] Obtain an initial data set I and an initial model M;
[0098] Based on the initial data set I and the initial model M, the model and data are jointly optimized through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0099] In the above method, in the process of artificial intelligence application design, based on the initial data set and the initial model, the model and data are jointly optimized through the automatic machine learning algorithm to obtain the optimized model and the optimized data set, thereby achieving the simultaneous acquisition of a better model structure and a more efficient training data set, thereby improving the efficiency of artificial intelligence application design.
[0100] In combination with the sixth aspect, in a possible implementation of the sixth aspect, based on the initial data set I and the initial model M, the joint optimization of the model and the data is performed by an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization, including the following steps:
[0101] S1: Based on the model M(r) and the data set I(r), the optimized data set I(r+1) is obtained through automatic data optimization;
[0102] S2: Based on the data set I(r+1), an optimized model M(r+1) is obtained through automatic model optimization;
[0103] S3: Determine whether the joint optimization is finished. If not, execute step S4. If finished, execute step S5.
[0104] S4: Let r=r+1, and repeat steps S1 to S3;
[0105] S5: Determine the model M(r+1) as the optimized model, and determine the data set I(r+1) as the optimized data set;
[0106] The initial value of r is 0. When r=0, the model M(r) is the initial model M, and the data set I(r) is the initial data set I.
[0107] In combination with the sixth aspect, in a possible implementation of the sixth aspect, the step of obtaining an optimized data set I(r+1) by automatic data optimization based on the model M(r) and the data set I(r) includes:
[0108] Based on the model M(r), automatic data enhancement search and / or automatic data validity search is performed on the data set I(r) to obtain the data set I(r+1).
[0109] In combination with the sixth aspect, in a possible implementation of the sixth aspect, the optimized model M(r+1) is obtained by automatic model optimization based on the data set I(r+1), including:
[0110] Based on the data set I(r+1), the model M(r+1) is obtained by automatic model structure search;
[0111] Alternatively, based on the data set I(r+1), a third model is obtained by automatic model structure search, and the third model is automatically compressed to obtain the model M(r+1);
[0112] Alternatively, based on the data set I(r+1), the model M(r) is automatically compressed to obtain the model M(r+1).
[0113] In combination with the sixth aspect, in a possible implementation of the sixth aspect, the automatic model optimization includes automatic hyperparameter search.
[0114] In combination with the sixth aspect, in a possible implementation of the sixth aspect, before obtaining the optimized model M(r+1) through automatic model optimization based on the data set I(r+1), the method further includes:
[0115] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0116] In conjunction with the sixth aspect, in a possible implementation of the sixth aspect, determining whether the joint optimization is finished includes:
[0117] Obtaining a third model index of the model M(r+1) and / or performing a third number of repetitions of steps S1 to S3;
[0118] If the third model indicator meets the third preset requirement and / or the third number of repetitions reaches the third preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0119] In a seventh aspect, the present application provides a model and data joint optimization device, comprising:
[0120] An acquisition module is used to obtain an initial data set I and an initial model M;
[0121] The joint optimization module is used to perform joint optimization of the model and data based on the initial data set I and the initial model M through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0122] In the above-mentioned device, in the process of artificial intelligence application design, based on the initial data set and the initial model, the model and data are jointly optimized through the automatic machine learning algorithm to obtain the optimized model and the optimized data set, thereby achieving the simultaneous acquisition of a better model structure and a more efficient training data set, thereby improving the efficiency of artificial intelligence application design.
[0123] In conjunction with the seventh aspect, in a possible implementation manner of the seventh aspect, the joint optimization module is specifically used to perform the following steps:
[0124] S1: Based on the model M(r) and the data set I(r), the optimized data set I(r+1) is obtained through automatic data optimization;
[0125] S2: Based on the data set I(r+1), an optimized model M(r+1) is obtained through automatic model optimization;
[0126] S3: Determine whether the joint optimization is finished. If not, execute step S4. If finished, execute step S5.
[0127] S4: Let r=r+1, and repeat steps S1 to S3;
[0128] S5: Determine the model M(r+1) as the optimized model, and determine the data set I(r+1) as the optimized data set;
[0129] The initial value of r is 0. When r=0, the model M(r) is the initial model M, and the data set I(r) is the initial data set I.
[0130] In conjunction with the seventh aspect, in a possible implementation manner of the seventh aspect, the joint optimization module is specifically used to:
[0131] Based on the model M(r), automatic data enhancement search and / or automatic data validity search is performed on the data set I(r) to obtain the data set I(r+1).
[0132] In conjunction with the seventh aspect, in a possible implementation manner of the seventh aspect, the joint optimization module is specifically used to:
[0133] Based on the data set I(r+1), the model M(r+1) is obtained by automatic model structure search;
[0134] Alternatively, based on the data set I(r+1), a third model is obtained by automatic model structure search, and the third model is automatically compressed to obtain the model M(r+1);
[0135] Alternatively, based on the data set I(r+1), the model M(r) is automatically compressed to obtain the model M(r+1).
[0136] In combination with the seventh aspect, in a possible implementation of the seventh aspect, the automatic model optimization includes automatic hyperparameter search.
[0137] In conjunction with the seventh aspect, in a possible implementation manner of the seventh aspect, the joint optimization module is specifically used to:
[0138] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0139] In conjunction with the seventh aspect, in a possible implementation manner of the seventh aspect, the joint optimization module is specifically used to:
[0140] Obtaining a third model index of the model M(r+1) and / or performing a third number of repetitions of steps S1 to S3;
[0141] If the third model indicator meets the third preset requirement and / or the third number of repetitions reaches the third preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0142] In an eighth aspect, the present application provides a model and data joint optimization device, comprising a processor and a memory. When the processor executes computer instructions stored in the memory, the method in the sixth aspect or any possible implementation of the sixth aspect is implemented.
[0143] In the ninth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed by a processor, the processor executes the method in the sixth aspect or any possible implementation of the sixth aspect.
[0144] In a tenth aspect, the present application provides a computer program product, comprising computer instructions, which, when executed on a recommendation device, causes the recommendation device to execute the method in the sixth aspect or any possible implementation of the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0145] Figure 1 Design flowchart for a model training;
[0146] Figure 2 A design flow chart of a model training provided in an embodiment of the present application;
[0147] Figure 3 A schematic diagram of a model and data joint optimization method provided in an embodiment of the present application;
[0148] Figure 4 A schematic diagram of another model and data joint optimization method provided in an embodiment of the present application;
[0149] Figure 5 A schematic diagram of another model and data joint optimization method provided in an embodiment of the present application;
[0150] Figure 6 A schematic diagram of another model and data joint optimization method provided in an embodiment of the present application;
[0151] Figure 7 A schematic diagram of another model and data joint optimization method provided in an embodiment of the present application;
[0152] Figure 8 A schematic diagram of a model and data joint optimization device provided in an embodiment of the present application;
[0153] Fig. 9 A schematic diagram of another model and data joint optimization device provided in an embodiment of the present application;
[0154] Fig.10 A schematic diagram of a model and data joint optimization device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0155] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0156] The "at least one" involved in the embodiments of the present application refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0157] Furthermore, unless otherwise specified, ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first information and the second information are only used to distinguish different information, and do not indicate the difference in content, priority, sending order or importance of the two types of information.
[0158] In order to facilitate the understanding of this application, the concepts involved in this application are first explained:
[0159] Machine Learning: Machine learning is a science of artificial intelligence. The main research object of this field is artificial intelligence, especially how to improve the performance of specific algorithms through empirical learning.
[0160] Automated machine learning (AutoML): The application of machine learning requires a lot of human intervention, including feature extraction, model selection, parameter adjustment and other aspects of machine learning. AutoML can automate the learning of these important steps related to features, models, optimization and evaluation, so that machine learning models can be applied without human intervention.
[0161] See also Figure 1 , Figure 1 This is a design flow chart for the current model training. Figure 1 As shown in the figure, in the process of model training, data and model design are decoupled, and the data sources of the sample set include self-collection and generation, wherein the source of self-collected data can be, for example, photography, sound collection, etc., and the source of generated data can be, for example, computer graphics (CG) synthesis, etc. The selection of training data sets is mainly based on the feedback of abnormal scenes that appear in the end, to find abnormal scenes, supplement data and retrain, while model design is mainly based on artificial priors, and rarely considers data sets. In the current design process of model training, optimization can be performed through the AutoML algorithm. Automatic model optimization can be performed through the AutoML model optimization technology, but the optimization process of the model can only be based on the initial data set, and the optimization of the data cannot be achieved, or, a better training data set can be obtained through the AutoML data optimization technology, but the optimization process of the data can only be based on the initial model, and the optimization of the model cannot be achieved. In this way, it is impossible to obtain a better model structure and a more efficient training data set at the same time, and the design efficiency is low.
[0162] Currently, methods for optimizing the model training process can only optimize the model structure or the training data set. For example, in the search-based data enhancement method, a search space for data enhancement strategies is created, and the quality of specific strategies is directly evaluated on some data sets. A search algorithm is used to search for the best strategy that enables the neural network to obtain the highest validation set accuracy on the target data set. However, this method only considers data enhancement for the same model to obtain a better data set, without optimizing the model structure. For another example, in the regularized neural network architecture search method, the optimized neural network structure for performing machine learning tasks can be determined based on the training data, but this method only considers the structure of the neural network and does not optimize the training data.
[0163] The model and data joint optimization method provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and can also be applied to smart home appliances such as speakers, televisions, and washing machines. The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
[0164] The concepts involved in the present application are introduced above, and the technical features of the embodiments of the present application are introduced below.
[0165] See also Figure 2 , Figure 2 A design flow chart of a model training provided in an embodiment of the present application. Figure 2 As shown, the initial training data set is obtained, and optionally, the initial model is also obtained. Based on the initial training data set or the optimized data set, the optimized model is obtained by AutoML automatic model optimization. Based on the initial model or the optimized model, the optimized data set is obtained by AutoML automatic data optimization, thereby realizing the joint optimization of the model and data, and finally obtaining the optimal model and optimal data set on the terminal side after the joint optimization. In this way, in the design process of model training, based on the initial data set, the model and data are jointly optimized by the automatic machine learning algorithm to obtain the optimized model and the optimized data set, thereby realizing the simultaneous acquisition of a better model structure and a more efficient training data set, and improving the design efficiency. Optionally, the AutoML automatic model optimization includes automatic model structure search, automatic model compression, etc., and the AutoML automatic data optimization includes automatic data enhancement search, automatic data validity search, etc. In addition, in the process of automatic model optimization, the hardware can be adapted to run. Specifically, the model terminal side indicators are obtained, wherein the model terminal side indicators include indicators such as model running time, memory, and power consumption. The model terminal side indicators are used to guide the automatic model optimization, thereby achieving the adaptation of the running hardware.
[0166] The model and data joint optimization method provided in the embodiment of the present application is widely used in the terminal deployment of artificial intelligence (AI) models.
[0167] Taking the deployment of a classification task network on a mobile phone as an example, if the model and data are not jointly optimized during the model training process, if the model running time indicator stipulates that it can only be completed within 15ms and the accuracy requirement is higher than 95%, but the initial model M has an accuracy of 96%, but the running time reaches 50ms, it cannot meet the requirement at this time.
[0168] Through the model and data joint optimization method provided in the embodiment of the present application, during the model training process, based on the initial model M and the corresponding data set, the model compression technology of automatic model optimization can be first adopted to obtain an optimized model M(1) that meets the running time of less than 15ms. However, since the optimized model is reduced a lot, the classification accuracy is lost a lot (the loss exceeds 3%). At this time, automatic data enhancement or active selection is performed based on the optimized model M(1). In this way, the accuracy can be effectively improved (by 2%) without changing the model structure. After the joint optimization of the model and data, an AI model that meets the time and accuracy requirements of the product end-side operation is finally obtained.
[0169] See also Figure 3 , Figure 3 A schematic diagram of a model and data joint optimization method provided in an embodiment of the present application. Figure 3 As shown, the model and data joint optimization method provided in the embodiment of the present application includes:
[0170] S301: Obtain an initial data set I.
[0171] During the model training process, an initial data set I is obtained, and the initial data set I is used for subsequent joint optimization of the model and data.
[0172] Optionally, during the model training process, in addition to obtaining the initial data set I, an initial model M can also be obtained. The initial data set I and the initial model M are used for subsequent joint optimization of the model and data.
[0173] S302. Based on the initial data set I, jointly optimize the model and data through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0174] After obtaining the initial data set I, an optimized model can be obtained through automatic model optimization based on the initial data set I, and then an optimized data set can be obtained through automatic data optimization based on the initial data set I and the optimized model, and the optimized data set is used to replace the initial data set I, and an optimized model can be obtained through automatic model optimization based on the optimized data set. In this way, an optimized model is obtained through automatic model optimization based on the initial data set or the optimized data set, and an optimized data set is obtained through automatic data optimization based on the optimized model, thereby realizing joint optimization of the model and data.
[0175] Optionally, automatic model optimization includes automatic model structure search, automatic model compression, etc., and automatic data optimization includes automatic data enhancement search, automatic data validity search, etc.
[0176] In a possible implementation, during the model training process, automatic model optimization includes automatic hyperparameter search, for example, automatic hyperparameter search may be performed using Bayesian optimization.
[0177] Optionally, in the process of automatic model optimization, it is also possible to adapt the running hardware. Specifically, the model end-side indicators are obtained, where the model end-side indicators include indicators such as model running time, memory, and power consumption. The model end-side indicators are used to guide automatic model optimization, thereby achieving adaptation of the running hardware.
[0178] In a possible implementation, the model end-side indicators may be obtained through end-side forward reasoning software.
[0179] In the above method, in the design process of model training, based on the initial data set, the model and data are jointly optimized through an automatic machine learning algorithm to obtain an optimized model and an optimized data set, thereby achieving a better model structure and a more efficient training data set at the same time, thereby improving design efficiency.
[0180] See also Figure 4 , Figure 4 Schematic diagram of another model and data joint optimization method provided in an embodiment of the present application. Figure 4 As shown, the model and data joint optimization method provided in the embodiment of the present application includes:
[0181] S401: Obtain an initial data set I.
[0182] During the model training process, an initial data set I is obtained, and the initial data set I is used for subsequent joint optimization of the model and data.
[0183] Optionally, during the model training process, in addition to obtaining the initial data set I, an initial model M can also be obtained. The initial data set I and the initial model M are used for subsequent joint optimization of the model and data.
[0184] S402. Based on the data set I(t), an optimized model M(t+1) is obtained through automatic model optimization, wherein the initial value of t is 0. When t=0, the data set I(t) is the initial data set I.
[0185] For example, the initial value of t is 0, and when t=0, the data set I(t) is the initial data set I. That is, after obtaining the initial data set I, based on the initial data set I, that is, based on the data set I(0), the optimized model M(1) can be obtained through automatic model optimization.
[0186] Optionally, automatic model optimization includes automatic model structure search, automatic model compression, etc.
[0187] In a possible implementation, based on the data set I(t), an optimized model M(t+1) is obtained through automatic model optimization, including: based on the data set I(t), the model M(t+1) is obtained through automatic model structure search; or, based on the data set I(t), a first model is obtained through automatic model structure search, and the first model is automatically compressed to obtain the model M(t+1).
[0188] For example, when t=0, based on the data set I(0), the optimized model M(1) is obtained through automatic model structure search; or, based on the data set I(0), the model M(0-1) is obtained through automatic model structure search, and the model M(0-1) is automatically compressed to obtain the optimized model M(1).
[0189] In a possible implementation, in addition to obtaining the initial data set I, an initial model M is also obtained during the model training process. Based on the data set I(t), an optimized model M(t+1) is obtained through automatic model optimization, including: based on the data set I(t), the model M(t) is automatically compressed to obtain the model M(t+1), wherein when t=0, the model M(t) is the initial model M.
[0190] For example, the initial value of t is 0. When t=0, the model M(t) is the initial model M. That is, based on the data set I(0), the model M(0) is automatically compressed to obtain the optimized model M(1).
[0191] In a possible implementation, during the model training process, automatic model optimization includes automatic hyperparameter search, for example, automatic hyperparameter search may be performed using Bayesian optimization.
[0192] Optionally, in the process of automatic model optimization, it is also possible to adapt the running hardware. Specifically, the model end-side indicators are obtained, where the model end-side indicators include indicators such as model running time, memory, and power consumption. The model end-side indicators are used to guide automatic model optimization, thereby achieving adaptation of the running hardware.
[0193] In a possible implementation, the model end-side indicators may be obtained through end-side forward reasoning software.
[0194] S403 . Based on the model M(t+1) and the data set I(t), an optimized data set I(t+1) is obtained through automatic data optimization.
[0195] For example, the initial value of t is 0, and the optimized model M(1) is obtained through step S402. Based on the optimized model M(1) and the data set I(0), the optimized data set I(1) can be obtained through automatic data optimization.
[0196] Optionally, automatic data optimization includes automatic data enhancement search, automatic data validity search, etc.
[0197] In a possible implementation, based on the model M(t+1) and the data set I(t), an optimized data set I(t+1) is obtained through automatic data optimization, including: based on the model M(t+1), performing automatic data enhancement search and / or automatic data validity search on the data set I(t) to obtain the data set I(t+1).
[0198] That is to say, based on the model M(t+1), the data set I(t) is automatically searched for data enhancement to obtain the automatic enhancement method for the data set I(t), thereby obtaining the enhanced data set I(t+1); or, based on the model M(t+1), the data set I(t) is automatically searched for data validity to obtain the data set I(t+1), wherein active learning and other methods may be used to automatically search for data validity; or, based on the model M(t+1), the data set I(t) is first automatically searched for data enhancement to obtain the enhanced data set, and then the enhanced data set is automatically searched for data validity to obtain the data set I(t+1); or, based on the model M(t+1), the data set I(t) is first automatically searched for data validity to obtain the valid data set, and then the valid data set is automatically searched for data enhancement to obtain the enhanced data set I(t+1).
[0199] For example, when t=0, based on the model M(1), an automatic data enhancement search and / or an automatic data validity search is performed on the data set I(0) to obtain an optimized data set I(1).
[0200] S404, determine whether the joint optimization is finished, if not finished, execute step S405, if finished, execute step S406.
[0201] Optionally, determining whether the joint optimization is completed includes: obtaining a first model indicator of the model M(t+1) and / or executing steps S402 to S404 for a first number of repetitions; if the first model indicator meets a first preset requirement and / or the first number of repetitions reaches a first preset threshold, determining that the joint optimization is completed, otherwise determining that the joint optimization is not completed.
[0202] That is to say, the first model indicator of the optimized model M(t+1) is obtained, and if the first model indicator meets the first preset requirement, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; or, the first number of repetitions of executing steps S402 to S404 is obtained, and if the first number of repetitions reaches the first preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; or, the first model indicator of the optimized model M(t+1) and the first number of repetitions of executing steps S402 to S404 are obtained, and if the first model indicator meets the first preset requirement and the first number of repetitions reaches the first preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended.
[0203] Optionally, the first model indicator includes at least one of model accuracy, model running time, memory, and power consumption.
[0204] For example, when t=0, the first model indicator of the optimized model M(1) is obtained. If the first model indicator meets the first preset requirement, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; alternatively, the first repetition number of executing steps S402 to S404 is obtained, and the first repetition number is 1. If 1 reaches the first preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; alternatively, the first model indicator of the optimized model M(1) and the first repetition number of executing steps S402 to S404 are obtained, and the first repetition number is 1. If the first model indicator meets the first preset requirement and 1 reaches the first preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended.
[0205] S405, let t=t+1, and repeat steps S402 to S404.
[0206] Specifically, let t=t+1, and repeat steps S402 to S404, including: based on the data set I(t+1), obtaining the optimized model M(t+2) through automatic model optimization; based on the model M(t+2) and the data set I(t+1), obtaining the optimized data set I(t+2) through automatic data optimization; judging whether the joint optimization is completed, if not, executing step S405, and if completed, executing step S406.
[0207] For example, the initial value of t is 0. After one optimization, the optimized model M(1) and the optimized data set I(1) are obtained, and it is determined that the joint optimization has not ended. Repeat step S402: Based on the data set I(1), the optimized model M(2) is obtained through automatic model optimization. Repeat step S403: Based on the optimized model M(2) and the optimized data set I(1), the optimized data set I(2) is obtained through automatic data optimization. Repeat step S404: Determine whether the joint optimization is ended. If not, execute step S405; if it is, execute step S406. Assuming that after two optimizations, the first model indicator of the optimized model M(2) meets the first preset requirement, it can be determined that the joint optimization is ended; or, assuming that after two optimizations, the first number of repetitions is 2, and 2 reaches the first preset threshold, it can be determined that the joint optimization is ended.
[0208] S406: Determine the model M(t+1) as the optimized model, and determine the data set I(t+1) as the optimized data set.
[0209] Specifically, after determining that the joint optimization is completed, the optimized model M(t+1) obtained by repeatedly executing steps S402 to S404 is the optimized model, and the optimized data set I(t+1) obtained by repeatedly executing steps S402 to S404 is the optimized data set.
[0210] For example, the initial value of t is 0. After one optimization, the optimized model M(1) and the optimized data set I(1) are obtained. At this time, it is determined that the joint optimization is not completed. A second optimization is performed. Based on the data set I(1), the optimized model M(2) is obtained through automatic model optimization. Based on the optimized model M(2) and the optimized data set I(1), the optimized data set I(2) is obtained through automatic data optimization. At this time, it is determined that the joint optimization is completed, and the optimized model M(2) is determined to be the final optimized model, and the optimized data set I(2) is determined to be the final optimized data set.
[0211] In the above method, in the design process of model training, after obtaining the initial data set I, an optimized model can be obtained based on the initial data set I through automatic model optimization, and then an optimized data set can be obtained based on the initial data set I and the optimized model through automatic data optimization, and the optimized data set replaces the initial data set I, and the optimized model can be obtained through automatic model optimization based on the optimized data set. In this way, based on the initial data set or the optimized data set, an optimized model is obtained through automatic model optimization, and based on the optimized model, an optimized data set is obtained through automatic data optimization. After model optimization, data optimization is taken into consideration, and joint optimization of model and data is achieved, thereby achieving a better model structure and a more efficient training data set at the same time, thereby improving design efficiency.
[0212] See also Figure 5 , Figure 5 Schematic diagram of another model and data joint optimization method provided in an embodiment of the present application. Figure 5 As shown, the model and data joint optimization method provided in the embodiment of the present application includes:
[0213] S501: Obtain an initial data set I.
[0214] During the model training process, an initial data set I is obtained, and the initial data set I is used for subsequent joint optimization of the model and data.
[0215] S502. Based on the data set I(k, j), n optimized models are obtained through automatic model optimization, wherein the n models include model M(k+1, j+1), model M(k+1, j+2), ..., model M(k+1, j+n), n is a positive integer, wherein the initial value of k is 0, the initial value of j is 0, and when k=0, j=0, the data set I(k, j) is the initial data set I.
[0216] For example, the initial value of k is 0, the initial value of j is 0, when k=0, j=0, the data set I(k, j) is the initial data set I. That is to say, after obtaining the initial data set I, based on the initial data set I, that is, based on the data set I(0, 0), the optimized n models can be obtained through automatic model optimization, and the n models include model M(1, 1), model M(1, 2), ..., model M(1, n), where n is a positive integer.
[0217] Optionally, automatic model optimization includes automatic model structure search, automatic model compression, etc.
[0218] In a possible implementation, based on the data set I(k, j), n optimized models are obtained through automatic model optimization, including: based on the data set I(k, j), the n models are obtained through automatic model structure search; or, based on the data set I(k, j), n second models are obtained through automatic model structure search, and the n second models are automatically model compressed to obtain the n models.
[0219] For example, when k=0, j=0, based on the data set I(0,0), n optimized models are obtained through automatic model structure search, which are model M(1,1), model M(1,2),…, model M(1,n); or, based on the data set I(0,0), n second models are obtained through automatic model structure search, and the n second models are automatically compressed to obtain n optimized models, which are model M(1,1), model M(1,2),…, model M(1,n).
[0220] In a possible implementation, during the model training process, automatic model optimization includes automatic hyperparameter search, for example, automatic hyperparameter search may be performed using Bayesian optimization.
[0221] Optionally, in the process of automatic model optimization, it is also possible to adapt the running hardware. Specifically, the model end-side indicators are obtained, where the model end-side indicators include indicators such as model running time, memory, and power consumption. The model end-side indicators are used to guide automatic model optimization, thereby achieving adaptation of the running hardware.
[0222] In a possible implementation, the model end-side indicators may be obtained through end-side forward reasoning software.
[0223] S503. Based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, wherein the n data sets include data set I(k+1, j+1), data set I(k+1, j+2), ..., data set I(k+1, j+n), and the n models correspond to the n data sets one by one.
[0224] For example, the initial value of k is 0, the initial value of j is 0, and after step S502, n optimized models are obtained. Based on the optimized n models and data set I(0, 0), n optimized data sets can be obtained through automatic data optimization. The n data sets include data set I(1, 1), data set I(1, 2), ..., data set I(1, n), and the n models correspond to the n data sets one by one.
[0225] Optionally, automatic data optimization includes automatic data enhancement search, automatic data validity search, etc.
[0226] In a possible implementation, based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, including: performing automatic data enhancement search and / or automatic data validity search on the data set I(k, j) based on the n models respectively to obtain the n data sets.
[0227] That is to say, based on the n models, the data set I(k, j) is automatically searched for data enhancement to obtain the automatic enhancement method for the data set I(k, j), thereby obtaining the n enhanced data sets; or, based on the n models, the data set I(k, j) is automatically searched for data validity to obtain the n data sets, wherein active learning and other methods can be used to automatically search for data validity; or, based on the n models, the data set I(k, j) is first automatically searched for data enhancement to obtain n enhanced data sets, and then the n enhanced data sets are automatically searched for data validity to obtain the n data sets; or, based on the n models, the data set I(k, j) is first automatically searched for data validity to obtain n valid data sets, and then the n valid data sets are automatically searched for data enhancement to obtain the n enhanced data sets.
[0228] For example, when k=0, j=0, based on model M(1,1), model M(1,2),…, model M(1,n), automatic data enhancement search and / or automatic data validity search is performed on data set I(0,0) to obtain optimized data set I(1,1), data set I(1,2),…, data set I(1,n).
[0229] S504. Obtain the best model M(k+1, j+w) among the n models, and obtain the data set I(k+1, j+w) corresponding to the model M(k+1, j+w) among the n data sets, where w is a positive integer not greater than n.
[0230] Specifically, the n models are tested to obtain the optimal model M(k+1, j+w) among the n models, and then a data set I(k+1, j+w) corresponding to the model M(k+1, j+w) is obtained from the n data sets, where w is a positive integer not greater than n.
[0231] S505: Determine whether the joint optimization is finished. If not, execute step S506; if finished, execute step S507.
[0232] Optionally, determining whether the joint optimization is completed includes: obtaining a second model indicator of the model M(k+1, j+w) and / or executing steps S502 to S505 a second number of repetitions; if the second model indicator meets a second preset requirement and / or the second number of repetitions reaches a second preset threshold, determining that the joint optimization is completed, otherwise determining that the joint optimization is not completed.
[0233] That is to say, the second model indicator of the optimized model M(k+1, j+w) is obtained, and if the second model indicator meets the second preset requirement, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; or, the second number of repetitions of executing steps S502 to S505 is obtained, and if the second number of repetitions reaches the second preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; or, the second model indicator of the optimized model M(k+1, j+w) is obtained and the second number of repetitions of executing steps S502 to S505 is obtained, and if the second model indicator meets the second preset requirement and the second number of repetitions reaches the second preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended.
[0234] Optionally, the second model indicator includes at least one of model accuracy, model running time, memory, and power consumption.
[0235] For example, when k=0 and j=0, the second model indicator of the optimized model M(1, w) is obtained. If the second model indicator meets the second preset requirement, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; alternatively, the second number of repetitions of executing steps S502 to S505 is obtained, and the second number of repetitions is 1. If 1 reaches the second preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; alternatively, the second model indicator of the optimized model M(1, w) is obtained and the second number of repetitions of executing steps S502 to S505 is 1. If the second model indicator meets the second preset requirement and 1 reaches the second preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended.
[0236] S506. Let k=k+1, j=j+w, and repeat steps S502 to S505.
[0237] For example, the initial value of k is 0, the initial value of j is 0, and after one optimization, assuming n=3, three optimized models are obtained, namely M(1,1), model M(1,2) and model M(1,3), and three optimized data sets are obtained, namely I(1,1), data set I(1,2) and data set I(1,3). The optimal model M(1,2) is obtained from the three optimized models, and the data set I(1,2) corresponding to the model M(1,2) is obtained from the three optimized data sets. At this time, it is determined that the joint optimization is not completed. Repeat step S502: Based on the data set I(1,2), it is assumed that three optimized models are obtained through automatic model optimization, namely model M(2,3), model M(2,4) and model M(2,5). Repeat step S503: Based on the optimized model M(2,3), model M(2,4), model M(2,5) and the optimized data set I(1,2), three optimized data sets are obtained through automatic data optimization, namely, data set I(2,3), data set I(2,4) and data set I(2,5). Repeat step S504: Obtain the optimal model M(2,4) from the optimized model M(2,3), model M(2,4) and model M(2,5), and obtain the data set I(2,4) corresponding to model M(2,4) from data sets I(2,3), data sets I(2,4) and data sets I(2,5). Repeat step S505: Determine whether the joint optimization is completed. If not, execute step S506. If completed, execute step S507. Assuming that after two optimizations, the second model indicator of the optimized model M(2, 4) meets the second preset requirement, it can be determined that the joint optimization is over; or, assuming that after two optimizations, the second number of repetitions is 2, and 2 reaches the second preset threshold, it can be determined that the joint optimization is over.
[0238] S507: Determine the model M(k+1, j+w) as the optimized model, and determine the data set I(k+1, j+w) as the optimized data set.
[0239] Specifically, after determining that the joint optimization is completed, the optimized model M(k+1, j+w) obtained by repeatedly executing steps S502 to S505 is the optimization model, and the optimized data set I(k+1, j+w) obtained by repeatedly executing steps S502 to S505 is the optimization data set.
[0240] For example, the initial value of k is 0, the initial value of j is 0, and after one optimization, the optimized models M(1,1), M(1,2) and M(1,3) are obtained, as well as the optimized data sets I(1,1), I(1,2) and I(1,3). The best model M(1,2) is obtained from the three optimized models, and the data set I(1,2) corresponding to the model M(1,2) is obtained from the three optimized data sets. At this time, it is determined that the joint optimization is not finished. A second optimization is performed, and based on the data set I(1,2), the optimized models M(2,3), M(2,4) and M(2,5) are obtained. Based on the optimized models M(2,3), M(2,4) and M(2,5) and the optimized data set I(1,2), the optimized data sets I(2,3), I(2,4) and I(2,5) are obtained. The optimal model M(2,4) is obtained from the optimized models M(2,3), M(2,4) and M(2,5), and the data set I(2,4) corresponding to the model M(2,4) is obtained from the data sets I(2,3), I(2,4) and I(2,5). At this time, it is determined that the joint optimization is completed, and the optimized model M(2,4) is determined to be the final optimized model, and the optimized data set I(2,4) is determined to be the final optimized data set.
[0241] In the above method, in the design process of model training, after obtaining the initial data set I, based on the initial data set I, the optimized n models can be obtained through automatic model optimization, and then based on the initial data set I and the optimized n models, the optimized n data sets can be obtained through automatic data optimization. The optimal model and the corresponding data set are obtained from the optimized n models, and the initial data set I is replaced by the data set corresponding to the optimal model, and the optimized n models can be obtained through automatic model optimization. In this way, on the one hand, the optimal model and the corresponding data set are obtained from the optimized n models for joint optimization, which can ensure that the final optimized model and optimized data set are optimal; on the other hand, based on the initial data set or the optimized data set, the optimized model is obtained through automatic model optimization, and based on the optimized model, the optimized data set is obtained through automatic data optimization. After the model is optimized, data optimization is taken into account, and the joint optimization of the model and data is realized, so that a better model structure and a more efficient training data set can be obtained at the same time, thereby improving the design efficiency.
[0242] See also Figure 6 , Figure 6 Schematic diagram of another model and data joint optimization method provided in an embodiment of the present application. Figure 6 As shown, the model and data joint optimization method provided in the embodiment of the present application includes:
[0243] S601: Obtain an initial data set I and an initial model M.
[0244] During the model training process, an initial data set I and an initial model M are obtained, and the initial data set I and the initial model M are used for subsequent joint optimization of the model and data.
[0245] S602: Based on the initial data set I and the initial model M, jointly optimize the model and the data through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0246] After obtaining the initial data set I and the initial model M, an optimized data set can be obtained through automatic data optimization based on the initial data set I and the initial model M, and then an optimized model can be obtained through automatic model optimization based on the optimized data set, and the optimized model is used to replace the initial model M. Based on the optimized model and the optimized data set, an optimized data set can be obtained through automatic data optimization. In this way, an optimized data set is obtained through automatic data optimization, and an optimized model is obtained through automatic model optimization based on the optimized data set, thereby realizing the joint optimization of the model and data.
[0247] Optionally, automatic model optimization includes automatic model structure search, automatic model compression, etc., and automatic data optimization includes automatic data enhancement search, automatic data validity search, etc.
[0248] In a possible implementation, during the model training process, automatic model optimization includes automatic hyperparameter search, for example, automatic hyperparameter search may be performed using Bayesian optimization.
[0249] Optionally, in the process of automatic model optimization, it is also possible to adapt the running hardware. Specifically, the model end-side indicators are obtained, where the model end-side indicators include indicators such as model running time, memory, and power consumption. The model end-side indicators are used to guide automatic model optimization, thereby achieving adaptation of the running hardware.
[0250] In a possible implementation, the model end-side indicators may be obtained through end-side forward reasoning software.
[0251] In the above method, in the design process of model training, based on the initial data set and the initial model, the model and data are jointly optimized through an automatic machine learning algorithm to obtain an optimized model and an optimized data set, thereby achieving a better model structure and a more efficient training data set at the same time, thereby improving design efficiency.
[0252] See also Figure 7 , Figure 7 Schematic diagram of another model and data joint optimization method provided in an embodiment of the present application. Figure 7 As shown, the model and data joint optimization method provided in the embodiment of the present application includes:
[0253] S701: Obtain an initial data set I and an initial model M.
[0254] During the model training process, an initial data set I and an initial model M are obtained, and the initial data set I and the initial model M are used for subsequent joint optimization of the model and data.
[0255] S702. Based on the model M(r) and the data set I(r), an optimized data set I(r+1) is obtained through automatic data optimization, wherein the initial value of r is 0. When r=0, the model M(r) is the initial model M, and the data set I(r) is the initial data set I.
[0256] For example, the initial value of r is 0. When r=0, the model M(r) is the initial model M, and the data set I(r) is the initial data set I. That is, after obtaining the initial data set I and the initial model M, based on the initial data set I and the initial model M, that is, based on the data set I(0) and the model M(0), the optimized data set I(1) can be obtained through automatic data optimization.
[0257] Optionally, automatic data optimization includes automatic data enhancement search, automatic data validity search, etc.
[0258] In a possible implementation, based on the model M(r) and the data set I(r), an optimized data set I(r+1) is obtained through automatic data optimization, including: based on the model M(r), performing automatic data enhancement search and / or automatic data validity search on the data set I(r) to obtain the data set I(r+1).
[0259] That is to say, based on the model M(r), the data set I(r) is automatically searched for data enhancement to obtain an automatic enhancement method for the data set I(r), thereby obtaining the enhanced data set I(r+1); or, based on the model M(r), the data set I(r) is automatically searched for data validity to obtain the data set I(r+1), wherein active learning and other methods may be used to automatically search for data validity; or, based on the model M(r), the data set I(r) is first automatically searched for data enhancement to obtain an enhanced data set, and then the enhanced data set is automatically searched for data validity to obtain the data set I(r+1); or, based on the model M(r), the data set I(r) is first automatically searched for data validity to obtain a valid data set, and then the valid data set is automatically searched for data enhancement to obtain the enhanced data set I(r+1).
[0260] For example, when r=0, based on the model M(0), an automatic data enhancement search and / or an automatic data validity search is performed on the data set I(0) to obtain an optimized data set I(1).
[0261] S703: Based on the data set I(r+1), an optimized model M(r+1) is obtained through automatic model optimization.
[0262] For example, the initial value of r is 0, and after step S702, an optimized data set I(1) is obtained. Based on the optimized data set I(1), an optimized model M(1) can be obtained through automatic model optimization.
[0263] Optionally, automatic model optimization includes automatic model structure search, automatic model compression, etc.
[0264] In a possible implementation, based on the data set I(r+1), an optimized model M(r+1) is obtained through automatic model optimization, including: based on the data set I(r+1), the model M(r+1) is obtained through automatic model structure search; or, based on the data set I(r+1), a third model is obtained through automatic model structure search, and the third model is automatically compressed to obtain the model M(r+1); or, based on the data set I(r+1), the model M(r) is automatically compressed to obtain the model M(r+1).
[0265] For example, when r=0, based on the data set I(1), the optimized model M(1) is obtained through automatic model structure search; or, based on the data set I(1), the model M(0-1) is obtained through automatic model structure search, and the model M(0-1) is automatically compressed to obtain the optimized model M(1); or, based on the data set I(1), the model M(0) is automatically compressed to obtain the optimized model M(1).
[0266] In a possible implementation, during the model training process, automatic model optimization includes automatic hyperparameter search, for example, automatic hyperparameter search may be performed using Bayesian optimization.
[0267] Optionally, in the process of automatic model optimization, it is also possible to adapt the running hardware. Specifically, the model end-side indicators are obtained, where the model end-side indicators include indicators such as model running time, memory, and power consumption. The model end-side indicators are used to guide automatic model optimization, thereby achieving adaptation of the running hardware.
[0268] In a possible implementation, the model end-side indicators may be obtained through end-side forward reasoning software.
[0269] S704, determine whether the joint optimization is finished, if not finished, execute step S705, if finished, execute step S706.
[0270] Optionally, determining whether the joint optimization is completed includes: obtaining a third model indicator of the model M(r+1) and / or executing steps S702 to S704 for a third number of repetitions; if the third model indicator meets a third preset requirement and / or the third number of repetitions reaches a third preset threshold, determining that the joint optimization is completed, otherwise determining that the joint optimization is not completed.
[0271] That is to say, the third model indicator of the optimized model M(r+1) is obtained, and if the third model indicator meets the third preset requirement, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; or, the third number of repetitions of executing steps S702 to S704 is obtained, and if the third number of repetitions reaches the third preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; or, the third model indicator of the optimized model M(r+1) and the third number of repetitions of executing steps S702 to S704 are obtained, and if the third model indicator meets the third preset requirement and the third number of repetitions reaches the third preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended.
[0272] Optionally, the third model indicator includes at least one of model accuracy, model running time, memory, and power consumption.
[0273] For example, when r=0, the third model indicator of the optimized model M(1) is obtained. If the third model indicator meets the third preset requirement, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; alternatively, the third number of repetitions of executing steps S702 to S704 is obtained, and the third number of repetitions is 1. If 1 reaches the third preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended; alternatively, the third model indicator of the optimized model M(1) is obtained and the third number of repetitions of executing steps S702 to S704 is 1. If the third model indicator meets the third preset requirement and 1 reaches the third preset threshold, it is determined that the joint optimization is ended, otherwise it is determined that the joint optimization is not ended.
[0274] S705 , let r=r+1, and repeat steps S702 to S704 .
[0275] Specifically, let r=r+1, and repeat steps S702 to S704, including: based on the model M(r+1) and the data set I(r+1), obtaining the optimized data set I(r+2) through automatic data optimization; based on the data set I(r+2), obtaining the optimized model M(r+2) through automatic model optimization; judging whether the joint optimization is completed, if not, executing step S705, and if completed, executing step S706.
[0276] For example, the initial value of r is 0. After one optimization, the optimized model M(1) and the optimized data set I(1) are obtained, and it is determined that the joint optimization is not completed. Repeat step S702: Based on the model (1) and the data set I(1), the optimized data set I(2) is obtained through automatic data optimization. Repeat step S703: Based on the optimized data set I(2), the optimized model M(2) is obtained through automatic model optimization. Repeat step S704: Determine whether the joint optimization is completed. If not, execute step S705; if completed, execute step S706. Assuming that after two optimizations, the third model index of the optimized model M(2) meets the third preset requirement, it can be determined that the joint optimization is completed; or, assuming that after two optimizations, the third number of repetitions is 2, and 2 reaches the third preset threshold, it can be determined that the joint optimization is completed.
[0277] S706: Determine the model M(r+1) as the optimized model, and determine the data set I(r+1) as the optimized data set.
[0278] Specifically, after the joint optimization is completed, the optimized model M(r+1) obtained by repeatedly executing steps S702 to S704 is the optimized model, and the optimized data set I(r+1) obtained by repeatedly executing steps S702 to S704 is the optimized data set.
[0279] For example, the initial value of r is 0. After one optimization, the optimized model M(1) and the optimized data set I(1) are obtained. At this time, it is determined that the joint optimization is not completed. A second optimization is performed. Based on the model M(1) and the data set I(1), the optimized data set I(2) is obtained through automatic data optimization. Based on the optimized data set I(2), the optimized model M(2) is obtained through automatic model optimization. At this time, it is determined that the joint optimization is completed, and the optimized model M(2) is determined to be the final optimized model, and the optimized data set I(2) is determined to be the final optimized data set.
[0280] In the above method, in the design process of model training, after obtaining the initial data set I and the initial model M, an optimized data set can be obtained based on the initial data set I and the initial model M through automatic data optimization, and then an optimized data model can be obtained based on the optimized data set through automatic model optimization, and the optimized model and the optimized data set replace the initial model M and the initial data set I, and based on the optimized model and the optimized data set, an optimized data set can be obtained through automatic data optimization. In this way, an optimized data set is obtained through automatic data optimization, and an optimized model is obtained through automatic model optimization based on the optimized data set. After data optimization, model optimization is taken into consideration, and joint optimization of model and data is achieved, thereby achieving a better model structure and a more efficient training data set at the same time, thereby improving design efficiency.
[0281] See also Figure 8 , Figure 8 A schematic diagram of a model and data joint optimization device provided in an embodiment of the present application. Figure 8 As shown, the model and data joint optimization device 800 provided in the embodiment of the present application includes:
[0282] An acquisition module 801 is used to acquire an initial data set I;
[0283] The joint optimization module 802 is used to perform joint optimization of the model and data based on the initial data set I through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0284] In an embodiment of the present application, in the design process of model training, based on the initial data set, the model and data are jointly optimized through an automatic machine learning algorithm to obtain an optimized model and an optimized data set, thereby achieving a better model structure and a more efficient training data set at the same time, thereby improving design efficiency.
[0285] In a possible implementation, the joint optimization module 802 is specifically configured to perform the following steps:
[0286] S1: Based on the data set I(t), the optimized model M(t+1) is obtained through automatic model optimization;
[0287] S2: Based on the model M(t+1) and the data set I(t), an optimized data set I(t+1) is obtained through automatic data optimization;
[0288] S3: Determine whether the joint optimization is finished. If not, execute step S4. If finished, execute step S5.
[0289] S4: Let t=t+1, and repeat steps S1 to S3;
[0290] S5: Determine the model M(t+1) as the optimized model, and determine the data set I(t+1) as the optimized data set;
[0291] The initial value of t is 0. When t=0, the data set I(t) is the initial data set I.
[0292] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0293] Based on the data set I(t), the model M(t+1) is obtained by automatic model structure search;
[0294] Alternatively, based on the data set I(t), a first model is obtained through automatic model structure search, and the first model is automatically compressed to obtain the model M(t+1).
[0295] In a possible implementation manner, the acquisition module 801 is further configured to:
[0296] Get the initial model M.
[0297] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0298] Based on the data set I(t), the model M(t) is automatically compressed to obtain the model M(t+1), wherein when t=0, the model M(t) is the initial model M.
[0299] In one possible implementation, the automatic model optimization includes automatic hyperparameter search.
[0300] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0301] Based on the model M(t+1), automatic data enhancement search and / or automatic data validity search is performed on the data set I(t) to obtain the data set I(t+1).
[0302] In a possible implementation, the joint optimization module 802 is further configured to:
[0303] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0304] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0305] Obtaining a first model index of the model M(t+1) and / or performing a first number of repetitions of steps S1 to S3;
[0306] If the first model indicator meets a first preset requirement and / or the first repetition number reaches a first preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0307] In a possible implementation, the joint optimization module 802 is specifically configured to perform the following steps:
[0308] S1: Based on the data set I(k, j), n optimized models are obtained through automatic model optimization, wherein the n models include model M(k+1, j+1), model M(k+1, j+2), ..., model M(k+1, j+n), where n is a positive integer;
[0309] S2: Based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, wherein the n data sets include data set I(k+1, j+1), data set I(k+1, j+2), ..., data set I(k+1, j+n), and the n models correspond to the n data sets one by one;
[0310] S3: Obtain the best model M(k+1, j+w) among the n models, and obtain a data set I(k+1, j+w) corresponding to the model M(k+1, j+w) among the n data sets, where w is a positive integer not greater than n;
[0311] S4: Determine whether the joint optimization is finished. If not, execute step S5. If finished, execute step S6.
[0312] S5: Let k=k+1, j=j+w, and repeat steps S1 to S4;
[0313] S6: Determine the model M(k+1, j+w) as the optimized model, and determine the data set I(k+1, j+w) as the optimized data set;
[0314] Among them, the initial value of k is 0, the initial value of j is 0, when k=0, j=0, the data set I(k, j) is the initial data set I.
[0315] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0316] Based on the data set I(k, j), obtaining the n models through automatic model structure search;
[0317] Alternatively, based on the data set I(k, j), n second models are obtained through automatic model structure search, and automatic model compression is performed on the n second models respectively to obtain the n models.
[0318] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0319] Based on the n models respectively, automatic data enhancement search and / or automatic data validity search are performed on the data set I(k, j) to obtain the n data sets.
[0320] In a possible implementation, the joint optimization module 802 is further configured to:
[0321] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0322] In a possible implementation, the joint optimization module 802 is specifically configured to:
[0323] Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4;
[0324] If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0325] See also Fig. 9 , Fig. 9 Schematic diagram of another model and data joint optimization device provided in an embodiment of the present application. Fig. 9 As shown, the model and data joint optimization device 900 provided in the embodiment of the present application includes:
[0326] An acquisition module 901 is used to acquire an initial data set I and an initial model M;
[0327] The joint optimization module 902 is used to perform joint optimization of the model and data based on the initial data set I and the initial model M through an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization.
[0328] In the above-mentioned device, in the design process of model training, based on the initial data set and the initial model, the model and data are jointly optimized through an automatic machine learning algorithm to obtain an optimized model and an optimized data set, thereby achieving a better model structure and a more efficient training data set at the same time, thereby improving design efficiency.
[0329] In a possible implementation, the joint optimization module 901 is specifically configured to perform the following steps:
[0330] S1: Based on the model M(r) and the data set I(r), the optimized data set I(r+1) is obtained through automatic data optimization;
[0331] S2: Based on the data set I(r+1), an optimized model M(r+1) is obtained through automatic model optimization;
[0332] S3: Determine whether the joint optimization is finished. If not, execute step S4. If finished, execute step S5.
[0333] S4: Let r=r+1, and repeat steps S1 to S3;
[0334] S5: Determine the model M(r+1) as the optimized model, and determine the data set I(r+1) as the optimized data set;
[0335] The initial value of r is 0. When r=0, the model M(r) is the initial model M, and the data set I(r) is the initial data set I.
[0336] In a possible implementation, the joint optimization module 901 is specifically used to:
[0337] Based on the model M(r), automatic data enhancement search and / or automatic data validity search is performed on the data set I(r) to obtain the data set I(r+1).
[0338] In a possible implementation, the joint optimization module 901 is specifically used to:
[0339] Based on the data set I(r+1), the model M(r+1) is obtained by automatic model structure search;
[0340] Alternatively, based on the data set I(r+1), a third model is obtained by automatic model structure search, and the third model is automatically compressed to obtain the model M(r+1);
[0341] Alternatively, based on the data set I(r+1), the model M(r) is automatically compressed to obtain the model M(r+1).
[0342] In one possible implementation, the automatic model optimization includes automatic hyperparameter search.
[0343] In a possible implementation, the joint optimization module 901 is specifically used to:
[0344] The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
[0345] In a possible implementation, the joint optimization module 901 is specifically used to:
[0346] Obtaining a third model index of the model M(r+1) and / or performing a third number of repetitions of steps S1 to S3;
[0347] If the third model indicator meets the third preset requirement and / or the third number of repetitions reaches the third preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
[0348] It can be understood that the model and data joint optimization device provided in the embodiment of the present application can implement the corresponding process of the model and data joint optimization method in the embodiment of the present application. For the sake of brevity, it will not be repeated here.
[0349] See also Fig.10 , Fig.10 A schematic diagram of a model and data joint optimization device provided in an embodiment of the present application. Fig.10 As shown, the model and data joint optimization device 1000 includes a processor 1010 , a communication interface 1020 , and a memory 1030 , and the processor 1010 , the communication interface 1020 , and the memory 1030 are interconnected via an internal bus 1040 .
[0350] The processor 1010 may be composed of one or more general-purpose processors, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0351] The bus 1040 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1040 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The bus is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0352] The memory 1030 may include a volatile memory, such as a random access memory (RAM); the memory 1030 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 1030 may also include a combination of the above types. The memory 1030 may be used to store programs and data, so that the processor 1010 calls the program code and data stored in the memory 1030 to implement the corresponding process of the model and data joint optimization method of the embodiment of the present application.
[0353] It can be understood that the model and data joint optimization device provided in the embodiment of the present application can implement the corresponding process of the cross-device link aggregation method in the embodiment of the present application. For the sake of brevity, it will not be repeated here.
[0354] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed by a processor, the processor executes the corresponding process of the model and data joint optimization method of the embodiment of the present application.
[0355] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed on a recommendation device, the recommendation device executes the corresponding process of the model and data joint optimization method of the embodiment of the present application.
[0356] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0357] It should be understood that the first, second, third, fourth and various numerical numbers involved in this document are only distinguished for the convenience of description and are not used to limit the scope of the present application.
[0358] It should also be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0359] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0360] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0361] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A model and data joint optimization method, characterized in that: include: Obtain an initial data set I; The data set I includes collected photographic data or sound data; The initial data set I is used for subsequent joint optimization of the model and data; Based on the initial data set I, jointly optimizing the model and the data by an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization; Based on the initial data set I, the joint optimization of the model and the data is performed by an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization, including the following steps: S1: Based on the data set I(k, j), n optimized models are obtained through automatic model optimization, wherein the n models include model M(k+1, j+1), model M(k+1, j+2), ..., model M(k+1, j+n), where n is a positive integer; S2: Based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, wherein the n data sets include data set I(k+1, j+1), data set I(k+1, j+2), ..., data set I(k+1, j+n), and the n models correspond to the n data sets one by one; S3: Obtain the best model M(k+1, j+w) among the n models, and obtain a data set I(k+1, j+w) corresponding to the model M(k+1, j+w) among the n data sets, where w is a positive integer not greater than n; S4: Determine whether the joint optimization is finished. If not, execute step S5. If finished, execute step S6. S5: Let k=k+1, j=j+w, and repeat steps S1 to S4; S6: Determine the model M(k+1, j+w) as the optimized model, and determine the data set I(k+1, j+w) as the optimized data set; Among them, the initial value of k is 0, the initial value of j is 0, when k=0, j=0, the data set I(k, j) is the initial data set I.
2. The method according to claim 1, characterized in that The n optimized models are obtained by automatic model optimization based on the data set I(k, j), including: Based on the data set I(k, j), obtaining the n models through automatic model structure search; Alternatively, based on the data set I(k, j), n second models are obtained through automatic model structure search, and automatic model compression is performed on the n second models respectively to obtain the n models.
3. The method according to claim 1 or 2, characterized in that: The step of obtaining the optimized n data sets by automatic data optimization based on the n models and the data set I(k, j) comprises: Based on the n models respectively, automatic data enhancement search and / or automatic data validity search is performed on the data set I(k, j) to obtain the n data sets.
4. The method according to claim 1 or 2, characterized in that: Before obtaining the optimized n models through automatic model optimization based on the data set I(k, j), the method further includes: The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
5. The method according to claim 3, characterized in that: Before obtaining the optimized n models through automatic model optimization based on the data set I(k, j), the method further includes: The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
6. The method according to claim 1, 2 or 5, characterized in that: The determining whether the joint optimization is finished includes: Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4; If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
7. The method according to claim 3, characterized in that The determining whether the joint optimization is finished includes: Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4; If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
8. The method according to claim 4, characterized in that The determining whether the joint optimization is finished includes: Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4; If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
9. A model and data joint optimization device, characterized in that: include: An acquisition module, used to acquire an initial data set I; The data set I includes collected photographic data or sound data; The initial data set I is used for subsequent joint optimization of the model and data; A joint optimization module, used to perform joint optimization of the model and the data based on the initial data set I by an automatic machine learning algorithm to obtain an optimized model and an optimized data set after joint optimization; The joint optimization module is specifically used to perform the following steps: S1: Based on the data set I(k, j), n optimized models are obtained through automatic model optimization, wherein the n models include model M(k+1, j+1), model M(k+1, j+2), ..., model M(k+1, j+n), where n is a positive integer; S2: Based on the n models and the data set I(k, j), n optimized data sets are obtained through automatic data optimization, wherein the n data sets include data set I(k+1, j+1), data set I(k+1, j+2), ..., data set I(k+1, j+n), and the n models correspond to the n data sets one by one; S3: Obtain the best model M(k+1, j+w) among the n models, and obtain a data set I(k+1, j+w) corresponding to the model M(k+1, j+w) among the n data sets, where w is a positive integer not greater than n; S4: Determine whether the joint optimization is finished. If not, execute step S5. If finished, execute step S6. S5: Let k=k+1, j=j+w, and repeat steps S1 to S4; S6: Determine the model M(k+1, j+w) as the optimized model, and determine the data set I(k+1, j+w) as the optimized data set; Among them, the initial value of k is 0, the initial value of j is 0, when k=0, j=0, the data set I(k, j) is the initial data set I.
10. The device according to claim 9, characterized in that The joint optimization module is specifically used for: Based on the data set I(k, j), obtaining the n models through automatic model structure search; Alternatively, based on the data set I(k, j), n second models are obtained through automatic model structure search, and automatic model compression is performed on the n second models respectively to obtain the n models.
11. The device according to claim 9 or 10, characterized in that The joint optimization module is specifically used for: Based on the n models respectively, automatic data enhancement search and / or automatic data validity search is performed on the data set I(k, j) to obtain the n data sets.
12. The device according to claim 9 or 10, characterized in that The joint optimization module is also used for: The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
13. The device according to claim 11, characterized in that The joint optimization module is also used for: The model end-side indicators are obtained through the end-side forward reasoning software, where the model end-side indicators are used to guide automatic model optimization.
14. The device according to claim 9, 10 or 13, characterized in that The joint optimization module is specifically used for: Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4; If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
15. The device according to claim 11, characterized in that The joint optimization module is specifically used for: Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4; If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
16. The device according to claim 12, characterized in that The joint optimization module is specifically used for: Obtaining a second model index of the model M(k+1, j+w) and / or performing a second number of repetitions of steps S1 to S4; If the second model indicator meets a second preset requirement and / or the second repetition number reaches a second preset threshold, it is determined that the joint optimization is ended; otherwise, it is determined that the joint optimization is not ended.
17. A model and data joint optimization device, characterized in that: The method comprises a processor and a memory, and when the processor executes the computer instructions stored in the memory, the method according to any one of claims 1 to 8 is performed.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a processor, the processor executes the method according to any one of claims 1 to 8.
