Method and device for automatically training machine learning models

Through the model training method alternately carried out in the competition stage and the growth stage, the hyperparameter optimization is automated, which solves the problem of time-consuming and labor-consuming hyperparameter parameter adjustment in the existing technology, and realizes efficient machine learning model training.

CN112241791BActive Publication Date: 2024-12-20THE FOURTH PARADIGM BEIJING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910656064.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-19
Publication Date
2024-12-20
Estimated Expiration
2039-07-19

AI Technical Summary

Technical Problem

In the prior art, the hyperparameter parameter adjustment of machine learning models depends on manual experience, is time-consuming and labor-intensive, and the calculation is huge, making it difficult to quickly and accurately determine the appropriate hyperparameter combination.

Method used

Using the model training method alternately carried out in the competition stage and the growth stage, the model is trained through multiple hyperparameter combinations, and the best-performing combination is selected to enter the next stage until the preset termination conditions are met, and automated hyperparameter optimization is achieved.

Benefits of technology

The calculation amount of hyperparameter optimization is reduced, automatic parameter adjustment is realized, model training efficiency is improved, and optimal hyperparameter combination and model can be obtained in one training cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112241791B_ABST
    Figure CN112241791B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for automatically training a machine learning model, the method comprising: in a competition stage, by respectively training corresponding competition models according to a machine learning algorithm under multiple competition hyperparameter combinations to obtain a competition model with the best effect, and taking the obtained competition model and its corresponding competition hyperparameter combination as a winning model and a winning hyperparameter combination to enter a growth stage; in the growth stage, under the winning hyperparameter combination obtained in this round of competition stage, continue to train the winning model obtained in this round of competition stage, and obtain the effect of the winning model; if the effect of the winning model indicates that the model effect stops growing, then restart the competition stage to continue to train the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations; otherwise, continue to train the winning model, and the above process is iterated repeatedly until a preset termination condition is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and more specifically, to a method and device for automatically training a machine learning model. Background Art

[0002] When using machine learning models to process data, the machine learning model needs to be trained first, and the model training process is controlled by hyperparameters. Hyperparameters are not parameters solved by machine learning itself, such as learning rate, batch size, and number of iterations. The quality of hyperparameter selection determines whether the machine learning model can converge correctly, the speed of convergence, and the final recognition performance of the model. Therefore, how to quickly and accurately determine the hyperparameters of machine learning models has always been a research topic in the field of deep learning.

[0003] At present, in the training process of machine learning models, the appropriate hyperparameters are mainly determined by manual parameter adjustment. This parameter adjustment method consumes huge energy and time, and is highly dependent on the experience of R&D personnel. In the prior art, in order to effectively reduce energy and time, multiple hyperparameter combinations are used to simultaneously train multiple machine learning models, and finally a hyperparameter combination with better effect is obtained. However, although this training method obtains a better hyperparameter combination, it does not obtain the final machine learning model, and the amount of calculation is huge. Summary of the invention

[0004] An object of the present invention is to provide a new technical solution for automatically training machine learning models.

[0005] According to a first aspect of the present invention, there is provided a method for automatically training a machine learning model, comprising:

[0006] In the competition stage, the corresponding competition models are trained according to the machine learning algorithm under multiple competition hyperparameter combinations to obtain the competition model with the best effect. The obtained competition model and its corresponding competition hyperparameter combination are regarded as the winning model and the winning hyperparameter combination and enter the growth stage.

[0007] In the growth phase, the winning model obtained in this round of competition phase is continued to be trained under the winning hyperparameter combination obtained in this round of competition phase, and the effect of the winning model is obtained. If the effect of the winning model indicates that the model effect stops growing, the competition phase is restarted to continue to train the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, the winning model is continued to be trained. The above process is iterated repeatedly until the preset termination condition is met;

[0008] Among them, the updated multiple competitive hyperparameter combinations are obtained based on the winning hyperparameter combinations in the previous round of growth stage, and the updated competitive models are all winning models obtained in the previous round of growth stage.

[0009] Optionally, in the competition stage, the corresponding competition models are trained according to the machine learning algorithm under multiple competition hyperparameter combinations to obtain the competition model with the best effect, including:

[0010] At the end of each of the multiple competition training steps in the competition phase, respectively obtain the effect of the competition model trained under each competition hyperparameter combination; and

[0011] Based on the obtained effects of each competitive model, the competitive hyperparameter combination and its corresponding competitive model entering the next competitive training step are adjusted, and the competitive model with the best effect at the end of the last competitive training step is obtained;

[0012] Wherein, in each competitive training step, at least one gradient update of the competitive model is performed based on a first predetermined number of training samples.

[0013] Optionally, adjusting the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step based on the obtained effects of each competitive model, and obtaining the competitive model with the best effect at the end of the last competitive training step, includes:

[0014] When the obtained effects of each competitive model indicate that the competitive model is not in a stopped state, if the current competitive training step is not the last competitive training step, the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step are obtained. If the current competitive training step is the last competitive training step, the competitive model with the best effect is obtained.

[0015] Optionally, obtaining a competitive hyperparameter combination and a corresponding competitive model for entering a next competitive training step includes:

[0016] Removing a second predetermined number of competitive models with the worst effects, thereby obtaining competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or

[0017] Replacing the second predetermined number of competitive models with the worst results with the third predetermined number of competitive models with the best results, and fine-tuning the competitive hyperparameter combinations of the second predetermined number of competitive models with the best results to be replaced, so as to obtain the competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or

[0018] Randomly remove a second predetermined number of competitive models to obtain competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or

[0019] Replacing the randomly selected second predetermined number of competitive models with the third predetermined number of competitive models with the best results, and fine-tuning the hyperparameter combination of each of the third predetermined number of competitive models with the best results, thereby obtaining competitions that enter the next competitive training step; or

[0020] Removing a second predetermined number of competitive models that have existed the longest, thereby obtaining competitive hyperparameter combinations and their corresponding competitive models that enter the next competitive training step; or

[0021] Replace the second predetermined number of competitive models with the longest existence with the third predetermined number of competitive models with the best effects, and fine-tune the hyperparameter combination of each of the third predetermined number of competitive models with the best effects, so as to obtain competitions that enter the next competitive training step; or

[0022] The competitive hyperparameter combination and its corresponding competitive model of the current competitive training step are directly used as the competitive hyperparameter combination and its corresponding competitive model of the next competitive training step.

[0023] Optionally, the second predetermined number is greater than or equal to the third predetermined number; and / or,

[0024] The second predetermined number is set to be a fixed value or a regularly changing value for each competitive training step.

[0025] Optionally, the method further includes obtaining the number of the competitive training steps, including:

[0026] The number of the competitive training steps is obtained according to the number of the competitive models, the total number of training samples, the maximum number of iterations of the training samples and the number of training samples that can be trained in each of the competitive training steps.

[0027] Optionally, in the growth stage, the winning model obtained in the current round of competition is continuously trained under the winning hyperparameter combination obtained in the current round of competition, and the effect of the winning model is obtained, including:

[0028] In the growth phase, the winning model obtained in this round of competition is trained according to the growth training steps under the winning hyperparameter combination obtained in this round of competition, and the effect of the winning model obtained in each growth training step is obtained;

[0029] In each growth training step, at least one gradient update of the winning model is performed based on a fourth predetermined number of training samples.

[0030] Optionally, the method further comprises:

[0031] Determining whether the effect of the winning model indicates that the model effect has stopped growing based on the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps;

[0032] The determining, based on the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps, whether the effect of the winning model indicates that the model effect has stopped growing includes:

[0033] When the effect of the winning model obtained after the fifth predetermined number of consecutive growth training steps shows a downward trend, determining that the effect of the winning model indicates that the model effect has stopped growing, wherein whether the downward trend occurs is determined based on the degree of decrease and / or jitter of the effect obtained after the fifth predetermined number of consecutive growth training steps; or

[0034] When the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps meets the preset attenuation condition, the effect indication of the winning model is determined to be that the model effect stops growing; wherein, the attenuation condition is satisfied when the sixth predetermined number of consecutive effects are all lower than the average of the seventh predetermined number of effects before it.

[0035] Optionally, the method further comprises:

[0036] Obtaining the effect of the winning model in the fifth predetermined number of consecutive growing training steps for each growing training step, and continuing to train the winning model includes:

[0037] If the effect of the winning model indicates that the model effect has not stopped growing, then continue with the next growth training step; or, the method further includes:

[0038] Obtaining the effect of the winning model in the fifth predetermined number of consecutive growth training steps for every fifth predetermined number of growth training steps, and continuing to train the winning model includes:

[0039] If the effect of the winning model indicates that the model effect has not stopped growing, then the next fifth predetermined number of growth training steps will continue.

[0040] Optionally, the preset termination condition indicates any one or more of the following:

[0041] The effect of each competing model obtained at the end of each competitive training step indicates that the competing model is in a stopped state;

[0042] The training time limit has been reached; and

[0043] The winning model achieved the expected results.

[0044] Optionally, the method further comprises:

[0045] When the performance indicator of the winning model shows that the model performance has stopped growing, determining whether the training time has reached the time limit; and / or

[0046] When the effect of the winning model indicates that the model effect stops growing, it is determined whether the effect of the winning model has reached the expected value.

[0047] Optionally, the method further comprises:

[0048] A trained machine learning model is obtained based on at least one best model obtained when a preset termination condition is met.

[0049] Optionally, the competitive hyperparameter combination includes at least one model hyperparameter and at least one training hyperparameter; or, the competitive hyperparameter combination includes at least one training hyperparameter.

[0050] Optionally, for each competitive hyperparameter combination in the first round of competition, at least one training hyperparameter is obtained by:

[0051] Dividing the linear hyperparameter space of each of the training hyperparameters into multiple parts, and taking multiple points in the middle as a candidate set of values ​​for each of the training hyperparameters;

[0052] For each of the competing models, a value is selected from the candidate value set of each of the training hyperparameters to form a configured set of training hyperparameter combinations.

[0053] Optionally, for each updated competitive hyperparameter combination of the restarted competitive phase, at least one training hyperparameter is obtained by:

[0054] Obtaining the value of each of the training hyperparameters from the winning hyperparameter combination in the previous growth phase;

[0055] Randomly setting the value of each of the training hyperparameters to the upper boundary or the lower boundary of the linear hyperparameter space of each of the training hyperparameters to obtain a new linear hyperparameter space;

[0056] Dividing the new linear hyperparameter space into multiple parts, and taking multiple points in the middle as a candidate set of values ​​for each of the training hyperparameters;

[0057] For each of the updated competitive models, a value is selected from the candidate value set of each of the training hyperparameters to form a configured set of training hyperparameter combinations.

[0058] Optionally, the training hyperparameters include a learning rate, and for each updated competitive hyperparameter combination of the restarted competitive phase, the learning rate is obtained in the following manner:

[0059] Obtain the value of the learning rate from the winning hyperparameter combination in the previous growth phase;

[0060] Setting the value of the learning rate to the upper boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space;

[0061] Obtaining an updated intermediate value of the learning rate hyperparameter space as an alternative value, and storing the alternative value in an alternative value set;

[0062] When the number of candidate values ​​included in the candidate value set is greater than or equal to the number of the updated competitive models, a corresponding candidate value is randomly assigned to each of the updated competitive models as a corresponding learning rate.

[0063] Optionally, the method further comprises:

[0064] When the number of candidate values ​​included in the candidate value set is less than the number of the updated competitive models, using the currently obtained candidate value as the lower boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space;

[0065] Re-execute the step of obtaining the updated intermediate value of the learning rate hyperparameter space as an alternative value, and storing the alternative value in the alternative value set.

[0066] Optionally, the preset termination condition indicates that: the effect of each competitive model obtained at the end of each competitive training step indicates that the competitive model is in a stopped state; and / or the training time reaches a time limit,

[0067] Furthermore, the method further comprises:

[0068] Determine whether a machine learning model with a desired effect can be obtained based on at least one best model obtained when a preset termination condition is satisfied;

[0069] When a machine learning model with a desired effect can be obtained, outputting the machine learning model with the desired effect;

[0070] If the machine learning model cannot achieve the desired effect, the model hyperparameters are reset and the competition phase is entered again.

[0071] Optionally, the training sample is composed of data, and the machine learning model is used to process the data;

[0072] The data at least includes image data, text data or voice data.

[0073] Optionally, the training samples are composed of image data, the machine learning model is a neural network model, the machine learning algorithm is a neural network algorithm, and the neural network model is used to process the image.

[0074] According to a second aspect of the present invention, there is also provided a base information processing method, comprising:

[0075] Obtain information of samples to be processed;

[0076] The sample information to be processed is processed using a preset machine learning model.

[0077] Among them, the machine learning model is the machine learning model obtained according to the first aspect of the present invention.

[0078] According to a third aspect of the present invention, there is also provided a device for automatically training a machine learning model, comprising:

[0079] A competition module is used to train corresponding competition models according to machine learning algorithms under multiple competition hyperparameter combinations to obtain a competition model with the best effect, and the obtained competition model and its corresponding competition hyperparameter combination are used as the winning model and the winning hyperparameter combination to enter the growth stage;

[0080] A growth module is used to continue training the winning model obtained in the current round of competition stage under the winning hyperparameter combination obtained in the current round of competition stage in the growth stage, and obtain the effect of the winning model. If the effect of the winning model indicates that the model effect stops growing, the competition stage is restarted to continue training the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, the winning model is continued to be trained. The above process is iterated repeatedly until the preset termination condition is met;

[0081] Among them, the updated multiple competitive hyperparameter combinations are obtained based on the winning hyperparameter combinations in the previous round of growth stage, and the updated competitive models are all winning models obtained in the previous round of growth stage.

[0082] According to a fourth aspect of the present invention, there is further provided an information processing device, comprising:

[0083] A sample information acquisition module, used to acquire sample information to be processed;

[0084] The sample information processing module is used to process the sample information to be processed using a preset machine learning model.

[0085] Among them, the machine learning model is the machine learning model obtained according to the first aspect of the present invention.

[0086] According to a fifth aspect of the present invention, there is also provided an electronic device, comprising:

[0087] The device for automatically training a machine learning model according to the third aspect of the present invention; or,

[0088] The information processing device according to the fourth aspect of the present invention; or,

[0089] A processor and a memory, wherein the memory is used to store instructions, and the instructions are used to control the processor to execute the method according to any one of the first aspect or the second aspect of the present invention.

[0090] According to a sixth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of the first aspect or the second aspect of the present invention.

[0091] According to the method and device of the embodiment of the present invention, based on the model parameter inheritance technology, a training process of the model is divided into several competition stages and growth stages. In the competition stage, multiple competition hyperparameter combinations are used to simultaneously train the corresponding competition models, and the hyperparameter combinations are continuously selected, eliminated and evolved. At the end of the competition stage, a group of competition hyperparameters and the corresponding competition model with the best performance are selected to enter the growth stage. In the competition stage, smaller training samples can be used to optimize the hyperparameters, which does not require manpower and has less calculation. In the growth stage, a large number of training samples are used to continue training the corresponding competition model using the competition hyperparameter combination that wins the competition stage, and when the model stops growing, it re-enters the competition stage for hyperparameter optimization. The above-mentioned competition stage and growth stage are performed alternately until the preset termination condition is met and the training stops.

[0092] On the one hand, since it discretizes the model training process based on model parameter inheritance technology, it reduces the amount of computation required for hyperparameter optimization starting from initialization, making it possible to complete the optimization selection of multiple sets of hyperparameters in one model training.

[0093] On the other hand, since the above-mentioned competition stage and growth stage are both in one training process, the optimal hyperparameter combination and the optimal machine learning model can be obtained through one training cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0095] Figure 1 is a block diagram showing an example of a hardware configuration of an electronic device that can be used to implement an embodiment of the present invention;

[0096] Figure 2A flowchart showing a method for automatically training a machine learning model according to an embodiment of the present invention is shown;

[0097] Figure 3 A flowchart showing an example of a method for automatically training a machine learning model according to an embodiment of the present invention;

[0098] Figure 4 A flow chart showing an information processing method according to an embodiment of the present invention;

[0099] Figure 5 A block diagram of an apparatus for automatically training a machine learning model according to an embodiment of the present invention is shown;

[0100] Figure 6 A block diagram of an information processing device according to an embodiment of the present invention is shown;

[0101] Figure 7 A block diagram showing an example of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0102] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0103] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0104] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0105] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0106] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0107] Hereinafter, various embodiments and examples according to embodiments of the present invention are described with reference to the accompanying drawings.

[0108] <Hardware Configuration>

[0109] Figure 1 1 is a block diagram showing a hardware configuration of an electronic device 1000 that can implement an embodiment of the present invention.

[0110] The electronic device 1000 may be a portable computer, a desktop computer, a mobile phone, a tablet computer, etc. Figure 1 As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. Among them, the processor 1100 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1200 includes, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1400 is, for example, capable of wired or wireless communication, and may specifically include Wifi communication, Bluetooth communication, 2G / 3G / 4G / 5G communication, and the like. The display device 1500 is, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The user may input / output voice information through the speaker 1700 and the microphone 1800.

[0111] Figure 1 The electronic device shown is merely illustrative and does not in any way limit the present invention, its application or use. In the embodiments of the present invention, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to perform any of the methods for automatically training a machine learning model provided in the embodiments of the present invention. It should be understood by those skilled in the art that although in Figure 1 In the electronic device 1000, multiple devices are shown, but the present invention may only involve some of the devices, for example, the electronic device 1000 only involves the processor 1100 and the storage device 1200. A technician can design instructions according to the scheme disclosed in the present invention. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0112] <Method Example 1>

[0113] In this embodiment, a method for automatically training a machine learning model is provided. The method for automatically training a machine learning model can be implemented by an electronic device, and the electronic device can be as follows: Figure 1 An electronic device 1000 is shown.

[0114] according to Figure 2 As shown, the method for automatically training a machine learning model in this embodiment may include the following steps S2100 to S2200:

[0115] Step S2100, in the competition stage, by training the corresponding competition models according to the machine learning algorithm under multiple competition hyperparameter combinations to obtain the competition model with the best effect, the obtained competition model and its corresponding competition hyperparameter combination are taken as the winning model and the winning hyperparameter combination to enter the growth stage.

[0116] The machine learning model can be a neural network model, such as but not limited to a BP (Back Propagation) neural network model, a convolutional neural network model, etc. The neural network model is used to process images. Of course, the machine learning model can also be a logistic regression model. The machine learning model is not specifically limited here.

[0117] Correspondingly, the machine learning algorithm may be a neural network algorithm, such as but not limited to a BP neural network algorithm, a convolutional neural network algorithm, and the like.

[0118] In this embodiment, a training process of the model is divided into several competition stages and several growth stages. In the competition stage, multiple competition hyperparameter combinations are used to simultaneously train the corresponding competition models, and the competition hyperparameter combinations are continuously selected, eliminated and evolved. The competition model with the best effect and its corresponding competition hyperparameter combination are selected to enter the growth stage. That is, in the growth stage, only the winning competition hyperparameter combination is used to continue training the corresponding competition model.

[0119] In one example, the competing hyperparameter combination may include at least one model hyperparameter and at least one training hyperparameter.

[0120] The above model hyperparameters are used to define the hyperparameters of the model, such as but not limited to activation functions (such as identity function, S-type function and truncated ramp function), the number of hidden layer nodes, the number of convolutional layer channels and the number of fully connected layer nodes.

[0121] The above training hyperparameters are used to define the hyperparameters of the model training process, such as but not limited to learning rate, batch size, and number of iterations.

[0122] In another example, the competing hyperparameter combination may include at least one training hyperparameter.

[0123] In this embodiment, the model training begins to enter the competition stage, that is, the current stage is the first round of competition. Here, for each competition hyperparameter combination in the first round of competition, at least one training hyperparameter can be obtained by following the steps S1010 to S1020:

[0124] Step S1010, dividing the linear hyperparameter space of each training hyperparameter into multiple parts, and taking multiple points in the middle as the candidate value set of each training hyperparameter.

[0125] In step S1010, if the current stage is initialization and entering the competition stage (first round competition stage), for example, the linear hyperparameter space of each training hyperparameter may be divided into N+2 parts or N+4 parts, and the middle N values ​​are taken as the candidate value set corresponding to the training hyperparameter. Wherein, N is the number of competition models, and the size of N can be adjusted adaptively, for example, the size of N can be set according to hardware resources (such as the number of CPU cores, the number of GPUs, and the number of clusters, etc.), or according to the current remaining training time, or calculated according to the following formula (1):

[0126] N=2*n+1(1)

[0127] Here, n may be the total number of training hyperparameters and model hyperparameters in the competitive hyperparameter combination, or may be only the number of training hyperparameters in the competitive hyperparameter combination, which is not limited here.

[0128] Step S1020: For each competing model, a value is selected from the candidate value set of each training hyperparameter to form a configured set of training hyperparameter combinations.

[0129] In step S1020, for each competing model, for example, a value may be randomly selected with medium probability from a candidate set of values ​​for each training hyperparameter as the hyperparameter value, or a value may be selected from a candidate set of values ​​for each training hyperparameter according to a preset probability distribution (for example but not limited to Gaussian distribution or Poisson distribution, etc.) as the hyperparameter value, and different training hyperparameters are each selected once to form a configured set of training hyperparameter combinations.

[0130] Here, it is sufficient to ensure that the training hyperparameter combinations configured for each competing model are different as a whole, for example but not limited to, the hyperparameter values ​​of the same training hyperparameters configured for each competing model are different from each other.

[0131] In one embodiment of the present invention, in the competition stage in step S2100, by respectively training corresponding competition models according to machine learning algorithms under multiple competition hyperparameter combinations to obtain a competition model with the best effect, the following steps S2110 to S2120 may be further included:

[0132] Step S2110, at the end of each of the multiple competitive training steps in the competition stage, respectively obtain the effect of the competitive model trained under each competitive hyperparameter combination.

[0133] In step S2110, for example, K competitive training steps may be set in the competitive stage, and for each competitive model entering the current competitive training step, the corresponding competitive model is trained in the current training step through a set of competitive hyperparameters to obtain the effect of the trained competitive model. Wherein, K is the number of competitive training steps in the competitive stage, and the size of K may be adaptively adjusted, for example, the size of K may be manually specified, or the size of K may be calculated based on the number of competitive models, the total number of training samples, the maximum number of iterations of training samples, and the number of training samples that can be trained in each competitive training step:

[0134]

[0135] Where N is the number of competing models, R is the maximum number of iterations of training samples, I is the total number of training samples, and i is the number of training samples that can be trained in each competitive training step.

[0136] Here, any indicator can be used to measure the effect of the competitive model. For example, the accuracy, loss rate, derivative of the accuracy, or derivative of the loss rate of the trained competitive model on the current verification data set can be used as the evaluation criteria. After the competitive model trained by each competitive hyperparameter combination is obtained at the end of the current competitive training step, the effects of the trained competitive models are ranked.

[0137] Step S2120, based on the obtained effects of each competitive model, adjust the competitive hyperparameter combination and its corresponding competitive model entering the next competitive training step, and obtain the competitive model with the best effect at the end of the last competitive training step.

[0138] It can be seen that according to an exemplary embodiment of the present invention, in the competition stage, it uses the model parameter inheritance technology. After obtaining the effect of the competition model trained by each competition hyperparameter combination at the end of the current competition training step, the competition hyperparameter combination and its corresponding competition model for entering the next competition training step can be obtained based on the effect. That is, in the model training process of the entire competition stage, no alternative model is used. Therefore, at the end of the competition stage training, in addition to being able to generate the optimal competition hyperparameter combination, it is also possible to generate a competition model with the best effect, and the competition model with the best effect corresponds to the optimal hyperparameter combination.

[0139] In one embodiment of the present invention, the step S2120 of adjusting the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step based on the obtained effects of each competitive model, and obtaining the competitive model with the best effect at the end of the last competitive training step may further include the following step S2121:

[0140] Step S2121, when the obtained effects of each competitive model indicate that the competitive model is not in a stopped state, if the current competitive training step is not the last competitive training step, the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step are obtained, and if the current competitive training step is the last competitive training step, the competitive model with the best effect is obtained.

[0141] The competition model is not in a stop state, which means that the best effect among the effects obtained at the end of each competition training step is better than the best effect obtained at the end of the previous competition training step.

[0142] In step S2121, in each competitive training step, at least one gradient update of the competitive model is performed based on a first predetermined number of training samples.

[0143] The first predetermined number may be set according to a specific application scenario or simulation experiment, and multiple competing models may use the same number of training samples to perform training in a competitive training step at the same time, but the training sample data of each specific competing model may be the same or different. For example, multiple competing models may use 1,000 training samples to perform training in a competitive training step respectively, but the 1,000 training sample data used by each may be the same or different.

[0144] In one embodiment of the present invention, the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step obtained in step S2121 may further include any one or more of the following steps S2121-1 to S2121-7:

[0145] Step S2121-1, remove the second predetermined number of competitive models with the worst effects, so as to obtain the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step.

[0146] The second predetermined number can be set according to a specific application scenario or simulation experiment. The second predetermined number is set to a fixed value or a regularly changing value for each competitive training step.

[0147] It can be understood that after removing the second predetermined number of competitive models with the worst effects, the number of competitive models entering the current competitive training step is less than the number of competitive models entering the next competitive training step.

[0148] It can be understood that by removing the worst effect model, a second predetermined number of models can be removed after the last competitive training step, leaving only one model with the best effect.

[0149] Step S2121-2, replace the second predetermined number of competitive models with the worst results with the third predetermined number of competitive models with the best results, and fine-tune the competitive hyperparameter combination of each of the third predetermined number of competitive models with the best results to obtain the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step.

[0150] The third predetermined number may be set according to a specific application scenario or simulation experiment.

[0151] The above second predetermined number is greater than or equal to the third predetermined number.

[0152] In one example, when the second predetermined number is equal to the third preset number, the number of competitive models entering the current competitive training step is the same as the number of competitive models entering the next competitive training step.

[0153] In another example, when the second predetermined number is greater than the third preset number, the number of competitive models entering the current competitive training step is less than the number of competitive models entering the next competitive training step.

[0154] In step S2121-2, there is no unique method for fine-tuning, such as but not limited to randomly increasing or decreasing the present value of the competitive hyperparameter combination by z%, to obtain a new set of competitive hyperparameter combinations, wherein z may be set according to specific application scenarios and simulation experiments.

[0155] Step S2121-3, randomly remove a second predetermined number of competitive models, so as to obtain competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step.

[0156] It can be understood that after randomly removing the second predetermined number of competitive models, the number of competitive models entering the current competitive training step is less than the number of competitive models entering the next competitive training step.

[0157] Step S2121-4, replace the randomly selected second predetermined number of competitive models with the third predetermined number of competitive models with the best effects, and fine-tune the hyperparameter combination of each of the third predetermined number of competitive models with the best effects, so as to obtain the competition for entering the next competitive training step.

[0158] Step S2121-5, remove the second predetermined number of competitive models that have existed the longest, so as to obtain the competitive hyperparameter combination and its corresponding competitive model that enters the next competitive training step.

[0159] It can be understood that after removing the second predetermined number of competitive models with the longest existence time, the number of competitive models entering the current competitive training step is less than the number of competitive models entering the next competitive training step.

[0160] Step S2121-6, replace the second predetermined number of competitive models with the longest existence with the third predetermined number of competitive models with the best effects, and fine-tune the hyperparameter combination of each of the third predetermined number of competitive models with the best effects, so as to obtain the competition for entering the next competitive training step.

[0161] Step S2121-7, directly use the competitive hyperparameter combination and its corresponding competitive model of the current competitive training step as the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step.

[0162] In this embodiment, after obtaining the competitive model with the best effect according to the above step S2100, the obtained competitive model and its corresponding competitive hyperparameter combination can be taken as the winning model and the winning hyperparameter combination to enter the growth stage, so as to continue to use the winning hyperparameter combination to fully train the winning model in the growth stage.

[0163] Step S2200, in the growth stage, under the winning hyperparameter combination obtained in this round of competition stage, continue to train the winning model obtained in this round of competition stage, and obtain the effect of the winning model. If the effect of the winning model indicates that the model effect stops growing, then restart the competition stage to continue training the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, continue to train the winning model. The above process is iterated repeatedly until the preset termination condition is met.

[0164] The main function of the growth stage is to use the winning hyperparameter combination obtained in this round of competition to fully train the winning model obtained in this round of competition. In addition, the number of training samples used in the competition stage is smaller than the number of training samples used in the growth stage. Therefore, in the competition stage, extremely low computational cost is used to optimize the hyperparameter combination, while the time-consuming focus of the model falls on the growth stage.

[0165] It can be seen that according to an exemplary embodiment of the present invention, the competition stage and the growth stage are repeatedly iterated, wherein, when returning to the competition stage from the growth stage, multiple updated competition hyperparameter combinations are obtained based on the winning hyperparameter combinations of the previous round of growth stage, and the updated competition models are all the winning models obtained in the previous round of growth stage.

[0166] In one example, when returning to the competition stage from the growth stage, since the updated multiple competition hyperparameter combinations are obtained based on the winning hyperparameter combination of the previous round of the growth stage, here, for each updated competition hyperparameter combination of the restarted competition stage, at least one training hyperparameter can be obtained by following the steps S2011 to S2014:

[0167] Step S2011, obtaining the value of each training hyperparameter from the winning hyperparameter combination in the previous growth phase.

[0168] In step S2011, if the current stage is entering the competition stage from the growth stage, for example, the value of each training hyperparameter in the winning hyperparameter combination in the previous round of the growth stage can be obtained, and the linear hyperparameter space of each training hyperparameter can be updated according to the value of each training hyperparameter.

[0169] Step S2012, randomly setting the value of each training hyperparameter to the upper boundary or lower boundary of the linear hyperparameter space of each training hyperparameter to obtain a new linear hyperparameter space.

[0170] Through step S2012, the linear hyperparameter space of each training hyperparameter can be narrowed.

[0171] Step S2013, divide the new linear hyperparameter space into multiple parts, and take multiple points in the middle as the candidate value set for each training hyperparameter.

[0172] In step S2013, the new linear hyperparameter space of each training hyperparameter may be divided into N+2 parts or N+4 parts, and the middle N values ​​are taken as the candidate value set corresponding to the training hyperparameter. The calculation of N has been given in detail in the above step S1010, which will not be repeated here.

[0173] Step S2014: for each updated competitive model, a value is selected from the candidate value set of each training hyperparameter to form a configured set of training hyperparameter combinations.

[0174] In step S2014, for each updated competitive model, for example, a value may be randomly selected with medium probability from a candidate set of values ​​for each training hyperparameter as the hyperparameter value, or a value may be selected from a candidate set of values ​​for each training hyperparameter according to a preset probability distribution (for example but not limited to Gaussian distribution or Poisson distribution, etc.) as the hyperparameter value, and different training hyperparameters are each selected once to form a configured set of training hyperparameter combinations.

[0175] Here, it is sufficient to ensure that the training hyperparameter combinations configured for each updated competitive model are different as a whole, for example but not limited to, the hyperparameter values ​​of the same training hyperparameters configured for each updated competitive model are different from each other.

[0176] In another example, the training hyperparameters include a learning rate, and according to a learning rate reduction strategy, for each updated competitive hyperparameter combination in the restarted competitive phase, the learning rate can be obtained by following the steps S2021 to S2024:

[0177] Step S2021, obtaining the value of the learning rate from the winning hyperparameter combination in the previous growth phase.

[0178] In step S2021, if the current phase is entering the competition phase from the growth phase, the value of the learning rate may be obtained from the winning hyperparameter combination of the previous growth phase, for example.

[0179] Step S2022, setting the value of the learning rate as the upper boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space.

[0180] Through step S2022, the hyperparameter space of the learning rate can be narrowed.

[0181] Step S2023, obtaining the middle value of the updated learning rate hyperparameter space as the candidate value, and storing the candidate value in the candidate value set.

[0182] Step S2024: When the number of candidate values ​​included in the candidate value set is greater than or equal to the number of updated competitive models, a corresponding candidate value is randomly assigned to each updated competitive model as a corresponding learning rate.

[0183] Step S2024, when the number of alternative values ​​included in the alternative value set is less than the number of updated competitive models, the currently obtained alternative value is used as the lower boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space, and step S2023 is re-executed to obtain the middle value of the updated learning rate hyperparameter space as the alternative value, and the alternative value is stored in the alternative value set.

[0184] In one example, the preset termination condition for terminating the above-mentioned repeated iterations indicates any one or more of the following:

[0185] The effect of each competing model obtained at the end of each competitive training step indicates that the competing model is in a stopped state;

[0186] The training time limit has been reached; and

[0187] The winning model achieved the expected results.

[0188] The competition model being in a stopped state means that the best effect among the effects obtained at the end of each competition training step is not better than the best effect obtained at the end of the previous competition training step.

[0189] In this example, for example, when the effect indication of the winning model shows that the model effect has stopped growing, it can be determined whether the training time has reached the time limit; for another example, when the effect indication of the winning model shows that the model effect has stopped growing, it can be determined whether the effect of the winning model has reached the expected value.

[0190] In this example, a trained machine learning model can be obtained based on at least one best model obtained when a preset termination condition is met, and the machine learning model can be output.

[0191] In one example, the preset termination condition for terminating the above-mentioned repeated iterations may also indicate: the effect of each competitive model obtained at the end of each competitive training step indicates that the competitive model is in a stopped state; and / or the training time reaches the time limit.

[0192] In this example, it can be determined whether the machine learning model with the expected effect can be obtained based on at least one model with the best effect obtained when the preset termination condition is satisfied. And in the case where the machine learning model with the expected effect can be obtained, the machine learning model with the expected effect is output; and, in the case where the machine learning model with the expected effect cannot be obtained, the model hyperparameters are reset and the competition stage is entered again. That is to say, based on the value of at least one model hyperparameter initially set, it is impossible to obtain the machine learning model with the expected effect only through repeated iterations of the competition stage and the growth stage. Therefore, it is necessary to reset the value of at least one model hyperparameter and enter the competition stage again, and then obtain the machine learning model with the expected effect through repeated iterations of the competition stage and the growth stage.

[0193] In one embodiment of the present invention, in step S2200, in the growth phase, under the winning hyperparameter combination obtained in the current round of competition phase, continuing to train the winning model obtained in the current round of competition phase, and obtaining the winning model effect may further include:

[0194] In the growth phase, under the winning hyperparameter combination obtained in this round of competition phase, the winning model obtained in this round of competition phase is continued to be trained according to the growth training steps, and the effect of the winning model obtained in each growth training step is obtained.

[0195] In this embodiment, in each growth training step, at least one gradient update of the winning model is performed based on a fourth predetermined number of training samples.

[0196] The fourth predetermined number may be set according to a specific application scenario or simulation experiment, and each growth training step may include the same number of training samples. For example, each growth training step includes 10,000 training samples; for another example, the first growth training step may train 10,000 samples, and the second growth training step may train 8,000 samples, etc.

[0197] In one embodiment of the present invention, it is possible to determine whether the effect of the winning model indicates that the model effect has stopped growing based on the effect obtained by the winning model in the fifth predetermined number of consecutive growth training steps. If it is indicated that the model effect has stopped growing, the competition phase is restarted to continue training the updated competition models according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, the winning model continues to be trained, and the above process is iterated repeatedly until the preset termination condition is met.

[0198] In one example, in this step, determining whether the effect of the winning model indicates that the model effect has stopped growing based on the effect of the winning model in the fifth predetermined number of consecutive growth training steps can be determined by any one or more of the following methods:

[0199] Method 1: When the effect of the winning model in the fifth predetermined number of consecutive growth training steps shows a downward trend, it is determined that the effect of the winning model indicates that the model effect stops growing.

[0200] The fifth predetermined number may be set according to a specific application scenario or a simulation experiment.

[0201] In the method 1, whether a downward trend occurs may be determined based on the degree of decline and / or jitter of the effect obtained in the fifth predetermined number of consecutive growth training steps.

[0202] Method 2: When the effect of the winning model in the fifth predetermined number of consecutive growth training steps meets the preset attenuation condition, it is determined that the effect of the winning model indicates that the model effect stops growing.

[0203] In the second mode, the attenuation condition is satisfied when the sixth predetermined number of consecutive effects are all lower than the average value of the seventh predetermined number of effects before them.

[0204] The sixth predetermined number and the seventh predetermined number may be set according to a specific application scenario or a simulation experiment.

[0205] For example, if the attenuation condition satisfies that any two consecutive effects are lower than the average of the three previous effects, then the attenuation condition may be:

[0206] and

[0207] Among them, v i 、v j represents the effect of any two consecutive steps in the fifth predetermined number of growth training steps, v i 、v i-1 、v i-3 Indicates the effect v i The previous three consecutive effects, v j 、v j-1 、v j-3 Indicates the effect v j The previous three continuous effects may be such that when the attenuation condition of formula (3) is satisfied, it is determined that the model effect stops growing.

[0208] In one embodiment of the present invention, obtaining the effect of the winning model in the fifth predetermined number of consecutive growing training steps for each growing training step, and continuing to train the winning model, includes:

[0209] If the performance of the winning model indicates that the model performance has not stopped growing, the next growth training step will be continued.

[0210] In one embodiment of the present invention, the effect of the winning model obtained in the fifth predetermined number of consecutive growing training steps is obtained for every fifth predetermined number of growing training steps, and continuing to train the winning model includes:

[0211] If the effect of the winning model indicates that the model effect has not stopped growing, then the next fifth predetermined number of growth training steps will continue.

[0212] According to the method of the embodiment of the present invention, based on the model parameter inheritance technology, a training process of the model is divided into several competition stages and growth stages. In the competition stage, multiple competition hyperparameter combinations are used to simultaneously train the corresponding competition models, and the hyperparameter combinations are continuously selected, eliminated and evolved. At the end of the competition stage, a group of competition hyperparameters and the corresponding competition model with the best performance are selected to enter the growth stage. Hyperparameter optimization is performed in the competition stage, and the corresponding competition model is continued to be trained using the winning competition hyperparameter combination in the competition stage in the growth stage. When the model stops growing, the competition stage is re-entered for hyperparameter optimization. The above-mentioned competition stage and growth stage are performed alternately until the preset termination condition is met and the training stops. No manpower is required and the amount of calculation is small, thereby realizing end-to-end automatic parameter adjustment.

[0213] On the one hand, since the above-mentioned competition stage and growth stage are both in one training process, the optimal hyperparameter combination and the optimal machine learning model can be obtained through one training cycle.

[0214] On the other hand, since it discretizes the model training process based on model parameter inheritance technology, it reduces the amount of calculation required for hyperparameter optimization starting from initialization, making it possible to complete the optimization selection of multiple sets of hyperparameters in one model training.

[0215] On the third aspect, since the prior art uses multiple hyperparameter combinations to train multiple machine learning models at the same time, P iterative selections are required, and each iterative selection requires training M models. After M*N trainings, the threshold set in advance is reached, and a hyperparameter combination that meets the requirements is obtained. The amount of calculation is huge, and the final model is not obtained. In this application, since the training samples used in the competition stage can be much less than the training samples used in the growth stage, the time-consuming focus of model training is placed on the growth stage, so the amount of calculation is only a fraction of the existing solution. Greatly reduce the calculation, that is, the final model is directly generated at the end of training, thus avoiding manual participation.

[0216] Based on the above embodiment, before executing step S2100, the method may further include steps S1100 to S1200 as shown below:

[0217] Step S1100, providing a setting entry for setting the application scenario of the machine learning model.

[0218] Users can determine the specific application scenarios of the required machine learning models based on their own needs, and input the application scenarios through this setting entry.

[0219] Step S1200, obtaining the application scenario input through the setting entry.

[0220] Then, step S1000 may be further performed as follows: obtaining a corresponding training sample set according to the input application scenario.

[0221] Specifically, the electronic device executing the embodiment of the present invention may pre-store training sample sets corresponding to a variety of application scenarios, and the training samples are composed of data, for example, image data, text data or voice data. According to the application scenario input through the setting entry of the provided application scenario, the training sample set matching the application scenario is obtained to perform machine learning training. In this way, the final machine learning model obtained can be applicable to the input application scenario and the data can be processed accordingly.

[0222] After the final machine learning model is obtained through the above embodiments, the method may further include steps S1300 to S1500 as shown below:

[0223] Step S1300, determining the application scenario to which the final machine learning model is applicable.

[0224] Step S1400: searching for application items that match the application scenario.

[0225] Step S1500, input the final machine learning model into the application project.

[0226] In this embodiment, the final machine learning model is input into an application project that matches the application scenario to which it is applicable, so that the final machine learning model is used in the corresponding application project to process sample information in the application project.

[0227] <Example>

[0228] The following will be combined Figure 3 The method for automatically training a machine learning model provided in this embodiment is further explained.

[0229] Step S3000, setting at least one model hyperparameter.

[0230] Step S3010, in the competition stage, obtain multiple competition models and multiple competition hyperparameter combinations.

[0231] In step S3010, the number of competing models may be N, and correspondingly, the number of competing hyperparameter combinations may also be N. Here, the number N of competing models (the number of competing hyperparameter combinations) may be calculated according to the above formula (1).

[0232] Among them, the competition hyperparameter combination includes at least one model hyperparameter and at least one training hyperparameter. The model hyperparameter can be determined according to the above step S3000, and the N competition hyperparameter combinations all include model hyperparameters with the same values; for each competition hyperparameter combination in the first round of competition, at least one training hyperparameter can be determined by steps S1010 to S1020 in the above embodiment; for each updated competition hyperparameter combination in the restarted competition stage, at least one training hyperparameter can be determined by steps S2011 to S2014 in the above embodiment, which will not be repeated here.

[0233] Step S3020, through multiple competition hyperparameter combinations, respectively train the corresponding competition model according to the machine learning algorithm for a competition training step, and at the end of the competition training step, respectively obtain the effect of the competition model trained under each competition hyperparameter combination, when the obtained effect of each competition model indicates that the competition model is not in a stopped state, execute step S3030, otherwise, execute step S3070.

[0234] Step S3030, determine whether the current competitive training step is the last competitive training step of this round of competition stage (that is, determine whether the current training step is equal to K); if the current competitive training step is not the last competitive training step of this round of competition stage (that is, the current training step is less than K), execute step S3040; if the current competitive training step is the last competitive training step of this round of competition stage, execute step S3050.

[0235] In step S3030, K is the number of competitive training steps in the competitive phase, which can be calculated according to the above formula (2).

[0236] Step S3040, generating a competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step from the multiple competitive models currently obtained, and re-executing step S3020.

[0237] In step S3040, how to generate a competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step from the multiple competitive models currently obtained has been described in detail in the above embodiments and will not be repeated here.

[0238] Step S3050, obtaining the competitive model with the best effect, and taking the obtained competitive model and its corresponding competitive hyperparameter combination as the winning model and the winning hyperparameter combination to enter the growth stage.

[0239] Step S3060, in the growth stage, under the winning hyperparameter combination obtained in this round of competition stage, continue to train the winning model obtained in this round of competition stage according to S growth training steps, and obtain the effect of the winning model obtained in each growth training step; when the effect of the winning model in S consecutive growth training steps meets the preset attenuation condition, determine that the winning model stops growing, and execute step S3070, otherwise, continue with the next training step, for example, the next S growth training steps.

[0240] In step S3060, S may be the fifth predetermined number in the above embodiment. Here, whether the winning model has lost its growth potential may be determined according to the above formula (3).

[0241] Step S3070, whether the training time reaches the time limit, and / or whether the effect of the winning model reaches the expected value. If not, re-execute step S3010 to enter the competition stage to continue training the updated competition model under the updated multiple competition hyperparameter combinations. Otherwise, execute step S3080.

[0242] Step S3080, based on whether at least one of the best models currently obtained can obtain a machine learning model with the expected effect, if not, execute step S3000 to reset the model hyperparameters, otherwise, execute step S3090.

[0243] Step S3090, output the machine learning model with the desired effect.

[0244] <Method Example 2>

[0245] The present invention also provides an information processing method, which may include: Figure 4 Steps S4100 to S4200 shown:

[0246] Step S4100, obtaining sample information to be processed.

[0247] The sample information is, for example but not limited to, image data, voice data, and text data, etc., which is not limited here.

[0248] Step S4200: Use a preset machine learning model to process the sample information to be processed.

[0249] Among them, the machine learning model is a machine learning model obtained through the above-mentioned embodiment.

[0250] In one example, the sample information to be processed may be image data containing a target to be detected. Then, processing the sample information to be processed using a preset machine learning model may be further performed as follows: using the machine learning model to process the image data containing the target to be detected to determine the defect category to which the undesirable defects in the target to be detected belong.

[0251] In another example, still taking the example that the sample information to be processed may be image data containing the target to be detected, then, processing the sample information to be processed using a preset machine learning model may be further as follows: using the machine learning model to process the image data containing the target to be detected, so as to locate the specific position of the defect in the target to be detected in the image data.

[0252] In another example, still taking the example that the sample information to be processed may be image data containing the target to be detected, then, the processing of the sample information to be processed using the preset machine learning model can be further as follows: using the machine learning model to process the image data containing the target to be detected to segment the contour information of the defect features, so that defects of different types and instances can be divided one by one.

[0253] Of course, in addition to the above image classification, image detection and / or image segmentation, image data processing can also include image generation, image semantic description, image 3D reconstruction, etc. Due to the development of neural network models, tasks in various detailed scenarios are not combined by basic tasks (classification / localization / segmentation / generation), but tend to be completed end-to-end. Therefore, any end-to-end task can be applied to this method, not limited to a few basic tasks.

[0254] <Device Example 1>

[0255] In this embodiment, a device 5000 for training a machine learning model is provided, such as Figure 5 As shown, it includes a competition module 5100 and a growth module 5200.

[0256] The competition module 5100 is used to train the corresponding competition models according to the machine learning algorithm under multiple competition hyperparameter combinations in the competition stage to obtain the competition model with the best effect, and the obtained competition model and its corresponding competition hyperparameter combination are used as the winning model and the winning hyperparameter combination to enter the growth stage.

[0257] The growth module 5200 is used to continue training the winning model obtained in this round of competition stage under the winning hyperparameter combination obtained in this round of competition stage during the growth stage, and obtain the effect of the winning model. If the effect of the winning model indicates that the model effect stops growing, the competition stage is restarted to continue training the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, the winning model is continued to be trained. The above process is iterated repeatedly until the preset termination condition is met.

[0258] Among them, the updated multiple competitive hyperparameter combinations are obtained based on the winning hyperparameter combinations in the previous round of growth stage, and the updated competitive models are all winning models obtained in the previous round of growth stage.

[0259] In one embodiment, the competition module 5100 is further used to obtain the effect of the competition model trained under each competition hyperparameter combination at the end of each competition training step among multiple competition training steps in the competition stage; and

[0260] Based on the obtained effects of each competitive model, the competitive hyperparameter combination and its corresponding competitive model entering the next competitive training step are adjusted, and the competitive model with the best effect at the end of the last competitive training step is obtained;

[0261] Wherein, in each competitive training step, at least one gradient update of the competitive model is performed based on a first predetermined number of training samples.

[0262] In one embodiment, the competition module 5100 is also used to obtain the competition hyperparameter combination and its corresponding competition model for entering the next competition training step when the effects of the obtained competition models indicate that the competition model is not in a stopped state, such as if the current competition training step is not the last competition training step; if the current competition training step is the last competition training step, then the competition model with the best effect is obtained.

[0263] In one embodiment, the competition module 5100 is further used to remove a second predetermined number of competition models with the worst effects, so as to obtain a competition hyperparameter combination and its corresponding competition model for entering the next competition training step; or

[0264] Replacing the second predetermined number of competitive models with the worst results with the third predetermined number of competitive models with the best results, and fine-tuning the competitive hyperparameter combinations of the replaced third predetermined number of competitive models with the best results, so as to obtain the competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or

[0265] Randomly remove a second predetermined number of competitive models to obtain competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or

[0266] Replacing the randomly selected second predetermined number of competitive models with the third predetermined number of competitive models with the best results, and fine-tuning the hyperparameter combination of each of the third predetermined number of competitive models with the best results, thereby obtaining competitions that enter the next competitive training step; or

[0267] Removing a second predetermined number of competitive models that have existed the longest, thereby obtaining competitive hyperparameter combinations and their corresponding competitive models that enter the next competitive training step; or

[0268] Replace the second predetermined number of competitive models with the longest existence with the third predetermined number of competitive models with the best effects, and fine-tune the hyperparameter combination of each of the third predetermined number of competitive models with the best effects, so as to obtain competitions that enter the next competitive training step; or

[0269] The competitive hyperparameter combination and its corresponding competitive model of the current competitive training step are directly used as the competitive hyperparameter combination and its corresponding competitive model of the next competitive training step.

[0270] In one embodiment, the second predetermined number is greater than or equal to the third predetermined number; and / or,

[0271] The second predetermined number is set to be a fixed value or a regularly changing value for each competitive training step.

[0272] In one embodiment, the competition module 5100 is further used to obtain the number of the competition training steps according to the number of the competition models, the total number of training samples, the maximum number of iterations of the training samples and the number of training samples that can be trained in each of the competition training steps.

[0273] In one embodiment, the growth module 5200 is further used to, in the growth phase, continue to train the winning model obtained in the current round of competition phase according to the growth training steps under the winning hyperparameter combination obtained in the current round of competition phase, and obtain the effect of the winning model obtained in each growth training step;

[0274] In each growth training step, at least one gradient update of the winning model is performed based on a fourth predetermined number of training samples.

[0275] In one embodiment, the growth module 5200 is further used to determine that the effect of the winning model indicates that the model effect stops growing when the effect obtained by the winning model in the fifth predetermined number of consecutive growth training steps shows a downward trend, wherein whether the downward trend occurs is determined based on the degree of decrease and / or jitter of the effect obtained in the fifth predetermined number of consecutive growth training steps; or

[0276] When the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps meets the preset attenuation condition, the effect indication of the winning model is determined to be that the model effect stops growing, wherein the attenuation condition is satisfied when the sixth predetermined number of consecutive effects are all lower than the average of the seventh predetermined number of effects before it.

[0277] In one embodiment, the growth module 5200 is further used to obtain the effect of the winning model in the fifth predetermined number of consecutive growth training steps for each growth training step, and if the effect of the winning model indicates that the model effect has not stopped growing, continue to the next growth training step; or,

[0278] The effect of the winning model in the fifth predetermined number of consecutive growth training steps is obtained for every fifth predetermined number of growth training steps, and if the effect of the winning model indicates that the model effect has not stopped growing, the next fifth predetermined number of growth training steps are continued.

[0279] In one embodiment, the preset termination condition indicates any one or more of the following:

[0280] The effect of each competing model obtained at the end of each competitive training step indicates that the competing model is in a stopped state;

[0281] The training time limit has been reached; and

[0282] The winning model achieved the expected results.

[0283] In one embodiment, the growth module 5200 is further used to determine whether the training time has reached the time limit when the effect indication of the winning model shows that the model effect stops growing; and / or

[0284] When the effect of the winning model indicates that the model effect stops growing, it is determined whether the effect of the winning model has reached the expected value.

[0285] In one embodiment, the growth module 5200 is also used to obtain a trained machine learning model based on at least one best model obtained when a preset termination condition is met.

[0286] In one embodiment, the competitive hyperparameter combination includes at least one model hyperparameter and at least one training hyperparameter; or, the competitive hyperparameter combination includes at least one training hyperparameter.

[0287] In one embodiment, the competition module 5100 is further used to divide the linear hyperparameter space of each training hyperparameter into multiple parts, and take multiple points in the middle as the candidate value set of each training hyperparameter;

[0288] For each of the competing models, a value is selected from the candidate value set of each of the training hyperparameters to form a configured set of training hyperparameter combinations.

[0289] In one embodiment, the competition stage 5100 is also used to obtain the value of each training hyperparameter from the winning hyperparameter combination of the previous round of growth stage;

[0290] Randomly setting the value of each of the training hyperparameters to the upper boundary or the lower boundary of the linear hyperparameter space of each of the training hyperparameters to obtain a new linear hyperparameter space;

[0291] Dividing the new linear hyperparameter space into multiple parts, and taking multiple points in the middle as a candidate set of values ​​for each of the training hyperparameters;

[0292] For each of the updated competitive models, a value is selected from the candidate value set of each of the training hyperparameters to form a configured set of training hyperparameter combinations.

[0293] In one embodiment, the competition stage 5100 is also used to obtain the value of the learning rate from the winning hyperparameter combination of the previous growth stage;

[0294] Setting the value of the learning rate to the upper boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space;

[0295] Obtaining an updated intermediate value of the learning rate hyperparameter space as an alternative value, and storing the alternative value in an alternative value set;

[0296] When the number of candidate values ​​included in the candidate value set is greater than or equal to the number of the updated competitive models, a corresponding candidate value is randomly assigned to each of the updated competitive models as a corresponding learning rate.

[0297] In one embodiment, the competition stage 5100 is further used to use the currently obtained candidate value as the lower boundary of the learning rate hyperparameter space when the number of candidate values ​​included in the candidate value set is less than the number of the updated competition models, so as to obtain an updated learning rate hyperparameter space;

[0298] Re-execute the step of obtaining the updated intermediate value of the learning rate hyperparameter space as an alternative value, and storing the alternative value in the alternative value set.

[0299] In one embodiment, the preset termination condition indicates that: the effect of each competitive model obtained at the end of each competitive training step indicates that the competitive model is in a stopped state; and / or the training time reaches a time limit,

[0300] The growth module 5200 is further used to determine whether a machine learning model with a desired effect can be obtained based on at least one best model obtained when a preset termination condition is satisfied;

[0301] When a machine learning model with a desired effect can be obtained, outputting the machine learning model with the desired effect;

[0302] If the machine learning model cannot achieve the desired effect, the model hyperparameters are reset and the competition phase is entered again.

[0303] In one embodiment, the training sample is composed of data, and the machine learning model is used to process the data;

[0304] The data at least includes image data, text data or voice data.

[0305] In one embodiment, the training samples are composed of image data, the machine learning model is a neural network model, the machine learning algorithm is a neural network algorithm, and the neural network model is used to process the image.

[0306] <Device Example 2>

[0307] In this embodiment, an information processing device 6000 is provided. Figure 6 As shown, it includes a sample information acquisition module 6100 and a sample information processing module 6200.

[0308] The sample information acquisition module 6100 is used to acquire the sample information to be processed;

[0309] The sample information processing module 6200 is used to process the sample information to be processed using a preset machine learning model.

[0310] <Electronic equipment>

[0311] In this embodiment, an electronic device 7000 is also provided. The electronic device 7000 may be Figure 1 An electronic device 1000 is shown.

[0312] On the one hand, the electronic device 7000 may include the aforementioned device 5000 for automatically training a machine learning model, for implementing the method for automatically training a machine learning model of any embodiment of the present invention; or may include the aforementioned information processing device 6000, for implementing the information processing method of any embodiment of the present invention.

[0313] On the other hand, Figure 7 As shown, the electronic device 7000 may also include a processor 7100 and a memory 7200, wherein the memory 7200 is used to store executable instructions; the processor 7100 is used to control the operation of the electronic device 7000 to execute the method for automatically training a machine learning model or the information processing method according to any embodiment of the present invention.

[0314] In this embodiment, the electronic device 7000 can be a mobile phone, a tablet computer, a PDA, a desktop computer, a laptop computer, a workstation, a game console, or other device.

[0315] <Computer Readable Storage Medium>

[0316] In this embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the method for training a machine learning model or the information processing method as in any embodiment of the present invention.

[0317] The present invention may be a device, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0318] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0319] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0320] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.

[0321] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.

[0322] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0323] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0324] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0325] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A method for automatically training a machine learning model, wherein: The training sample is composed of data, and the machine learning model is used to process the data, wherein the data at least includes image data, text data or voice data, and one training of the machine learning model is divided into several competition stages and several growth stages. The method includes: In the competition stage, the corresponding competition models are trained according to the machine learning algorithm under multiple competition hyperparameter combinations to obtain the competition model with the best effect. The obtained competition model and its corresponding competition hyperparameter combination are regarded as the winning model and the winning hyperparameter combination and enter the growth stage. In the growth phase, the winning model obtained in this round of competition phase is continued to be trained under the winning hyperparameter combination obtained in this round of competition phase, and the effect of the winning model is obtained. If the effect of the winning model indicates that the model effect stops growing, the competition phase is restarted to continue to train the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, the winning model is continued to be trained. The above process is iterated repeatedly until the preset termination condition is met; Among them, the updated multiple competitive hyperparameter combinations are obtained based on the winning hyperparameter combinations in the previous round of growth stage, and the updated competitive models are all winning models obtained in the previous round of growth stage.

2. The method according to claim 1, wherein: In the competition stage, the corresponding competition models are trained according to the machine learning algorithm under multiple competition hyperparameter combinations to obtain the competition model with the best effect, including: At the end of each of the multiple competition training steps in the competition phase, respectively obtain the effect of the competition model trained under each competition hyperparameter combination; and Based on the obtained effects of each competitive model, the competitive hyperparameter combination and its corresponding competitive model entering the next competitive training step are adjusted, and the competitive model with the best effect at the end of the last competitive training step is obtained; Wherein, in each competitive training step, at least one gradient update of the competitive model is performed based on a first predetermined number of training samples.

3. The method according to claim 2, wherein: The method of adjusting the competitive hyperparameter combination and its corresponding competitive model for the next competitive training step based on the obtained effects of each competitive model, and obtaining the competitive model with the best effect at the end of the last competitive training step, includes: When the obtained effects of each competitive model indicate that the competitive model is not in a stopped state, if the current competitive training step is not the last competitive training step, the competitive hyperparameter combination and its corresponding competitive model for entering the next competitive training step are obtained. If the current competitive training step is the last competitive training step, the competitive model with the best effect is obtained.

4. The method according to claim 3, wherein: The obtaining of the competitive hyperparameter combination and the corresponding competitive model for entering the next competitive training step includes: Removing a second predetermined number of competitive models with the worst effects, thereby obtaining competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or Replacing the second predetermined number of competitive models with the worst results with the third predetermined number of competitive models with the best results, and fine-tuning the competitive hyperparameter combinations of the replaced third predetermined number of competitive models with the best results, so as to obtain the competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or Randomly remove a second predetermined number of competitive models to obtain competitive hyperparameter combinations and their corresponding competitive models for entering the next competitive training step; or Replacing the randomly selected second predetermined number of competitive models with the third predetermined number of competitive models with the best results, and fine-tuning the hyperparameter combination of each of the third predetermined number of competitive models with the best results, thereby obtaining competitions that enter the next competitive training step; or Removing a second predetermined number of competitive models that have existed the longest, thereby obtaining competitive hyperparameter combinations and their corresponding competitive models that enter the next competitive training step; or Replace the second predetermined number of competitive models with the longest existence with the third predetermined number of competitive models with the best effects, and fine-tune the hyperparameter combination of each of the third predetermined number of competitive models with the best effects, so as to obtain competitions that enter the next competitive training step; or The competitive hyperparameter combination and its corresponding competitive model of the current competitive training step are directly used as the competitive hyperparameter combination and its corresponding competitive model of the next competitive training step.

5. The method according to claim 4, wherein: The second predetermined number is greater than or equal to the third predetermined number; and / or, The second predetermined number is set to be a fixed value or a regularly changing value for each competitive training step.

6. The method according to claim 2, wherein: The method further includes obtaining the number of competitive training steps, including: The number of the competitive training steps is obtained according to the number of the competitive models, the total number of training samples, the maximum number of iterations of the training samples and the number of training samples that can be trained in each of the competitive training steps.

7. The method according to claim 1, wherein: In the growth stage, the winning model obtained in this round of competition is continuously trained under the winning hyperparameter combination obtained in this round of competition, and the effect of the winning model is obtained, including: In the growth phase, the winning model obtained in this round of competition is trained according to the growth training steps under the winning hyperparameter combination obtained in this round of competition, and the effect of the winning model obtained in each growth training step is obtained; In each growth training step, at least one gradient update of the winning model is performed based on a fourth predetermined number of training samples.

8. The method according to claim 7, wherein: The method further comprises: Determining whether the effect of the winning model indicates that the model effect has stopped growing based on the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps; The determining, based on the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps, whether the effect of the winning model indicates that the model effect has stopped growing includes: When the effect of the winning model obtained after the fifth predetermined number of consecutive growth training steps shows a downward trend, determining that the effect of the winning model indicates that the model effect has stopped growing, wherein whether the downward trend occurs is determined based on the degree of decrease and / or jitter of the effect obtained after the fifth predetermined number of consecutive growth training steps; or When the effect of the winning model obtained in the fifth predetermined number of consecutive growth training steps meets the preset attenuation condition, the effect indication of the winning model is determined to be that the model effect stops growing, wherein the attenuation condition is satisfied when the sixth predetermined number of consecutive effects are all lower than the average of the seventh predetermined number of effects before it.

9. The method according to claim 8, wherein: The method further comprises: Obtaining the effect of the winning model in the fifth predetermined number of consecutive growing training steps for each growing training step, and continuing to train the winning model includes: If the effect of the winning model indicates that the model effect has not stopped growing, then continue with the next growth training step; or, the method further includes: Obtaining the effect of the winning model in the fifth predetermined number of consecutive growth training steps for every fifth predetermined number of growth training steps, and continuing to train the winning model includes: If the effect of the winning model indicates that the model effect has not stopped growing, then the next fifth predetermined number of growth training steps will continue.

10. The method according to claim 1, wherein: The preset termination condition indicates any one or more of the following: The effect of each competing model obtained at the end of each competitive training step indicates that the competing model is in a stopped state; The training time limit has been reached; and The winning model achieved the expected results.

11. The method according to claim 10, wherein: The method further comprises: When the performance indicator of the winning model shows that the model performance has stopped growing, determining whether the training time has reached the time limit; and / or When the effect of the winning model indicates that the model effect stops growing, it is determined whether the effect of the winning model has reached the expected value.

12. The method according to claim 11, wherein: The method further comprises: A trained machine learning model is obtained based on at least one best model obtained when a preset termination condition is met.

13. The method according to claim 1, wherein: The competitive hyperparameter combination includes at least one model hyperparameter and at least one training hyperparameter; or, the competitive hyperparameter combination includes at least one training hyperparameter.

14. The method according to claim 13, wherein: For each competitive hyperparameter combination in the first round of competition, at least one training hyperparameter is obtained in the following way: Dividing the linear hyperparameter space of each of the training hyperparameters into multiple parts, and taking multiple points in the middle as a candidate set of values ​​for each of the training hyperparameters; For each of the competing models, a value is selected from the candidate value set of each of the training hyperparameters to form a configured set of training hyperparameter combinations.

15. The method according to claim 13, wherein: For each updated competitive hyperparameter combination of the restarted competition phase, at least one of the training hyperparameters is obtained as follows: Obtaining the value of each of the training hyperparameters from the winning hyperparameter combination in the previous growth phase; Randomly setting the value of each of the training hyperparameters to the upper boundary or the lower boundary of the linear hyperparameter space of each of the training hyperparameters to obtain a new linear hyperparameter space; Dividing the new linear hyperparameter space into multiple parts, and taking multiple points in the middle as a candidate set of values ​​for each of the training hyperparameters; For each of the updated competitive models, a value is selected from the candidate value set of each of the training hyperparameters to form a configured set of training hyperparameter combinations.

16. The method according to claim 13, wherein: The training hyperparameters include a learning rate. For each updated competitive hyperparameter combination in the restarted competitive phase, the learning rate is obtained in the following manner: Obtain the value of the learning rate from the winning hyperparameter combination in the previous growth phase; Setting the value of the learning rate to the upper boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space; Obtaining an updated intermediate value of the learning rate hyperparameter space as an alternative value, and storing the alternative value in an alternative value set; When the number of candidate values ​​included in the candidate value set is greater than or equal to the number of the updated competitive models, a corresponding candidate value is randomly assigned to each of the updated competitive models as a corresponding learning rate.

17. The method according to claim 16, wherein: The method further comprises: When the number of candidate values ​​included in the candidate value set is less than the number of the updated competitive models, using the currently obtained candidate value as the lower boundary of the learning rate hyperparameter space to obtain an updated learning rate hyperparameter space; Re-execute the step of obtaining the updated intermediate value of the learning rate hyperparameter space as an alternative value, and storing the alternative value in the alternative value set.

18. The method according to claim 13, wherein: The preset termination condition indicates that: the effect of each competitive model obtained at the end of each competitive training step indicates that the competitive model is in a stopped state; and / or the training time limit has been reached, Furthermore, the method further comprises: Determine whether a machine learning model with a desired effect can be obtained based on at least one best model obtained when a preset termination condition is satisfied; When a machine learning model with a desired effect can be obtained, outputting the machine learning model with the desired effect; If the machine learning model cannot achieve the desired effect, the model hyperparameters are reset and the competition phase is entered again.

19. A device for automatically training a machine learning model, wherein: The training sample is composed of data, and the machine learning model is used to process the data, wherein the data at least includes image data, text data or voice data, and one training of the machine learning model is divided into several competition stages and several growth stages. The device includes: A competition module is used to train corresponding competition models according to machine learning algorithms under multiple competition hyperparameter combinations to obtain a competition model with the best effect, and the obtained competition model and its corresponding competition hyperparameter combination are used as the winning model and the winning hyperparameter combination to enter the growth stage; A growth module is used to continue training the winning model obtained in the current round of competition stage under the winning hyperparameter combination obtained in the current round of competition stage in the growth stage, and obtain the effect of the winning model. If the effect of the winning model indicates that the model effect stops growing, the competition stage is restarted to continue training the updated competition model according to the machine learning algorithm under the updated multiple competition hyperparameter combinations. Otherwise, the winning model is continued to be trained. The above process is iterated repeatedly until the preset termination condition is met; Among them, the updated multiple competitive hyperparameter combinations are obtained based on the winning hyperparameter combinations in the previous round of growth stage, and the updated competitive models are all winning models obtained in the previous round of growth stage.

20. An electronic device, wherein: include: The device for automatically training a machine learning model as claimed in claim 19; or, A processor and a memory, wherein the memory is used to store instructions, and the instructions are used to control the processor to execute the method according to any one of claims 1 to 18.

21. A computer-readable storage medium, wherein: A computer program is stored thereon, which implements the method according to any one of claims 1 to 18 when executed by a processor.

Citation Information

Patent Citations

  • Training device and method, and detection device

    CN105447566A

  • A method and system for performing object detection using a multi-task object detection model

    CN109344806A