WO2022110640A1 - 一种模型优化方法、装置、计算机设备及存储介质 - Google Patents
一种模型优化方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2022110640A1 WO2022110640A1 PCT/CN2021/090501 CN2021090501W WO2022110640A1 WO 2022110640 A1 WO2022110640 A1 WO 2022110640A1 CN 2021090501 W CN2021090501 W CN 2021090501W WO 2022110640 A1 WO2022110640 A1 WO 2022110640A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- user
- update
- updated
- decision parameter
- gradient
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Definitions
- the present application relates to model optimization of artificial intelligence, and in particular, to a model optimization method, device, computer equipment and storage medium applied to momentum gradient descent.
- optimization problem is one of the most important research directions in computational mathematics. In the field of deep learning, optimization algorithms are also one of the key links. Even with the same data set and model architecture, different optimization algorithms are likely to lead to different training results, and even some models do not converge.
- the applicant realizes that the applicant finds that the traditional model optimization method is generally unintelligent, and the Embedding layer may have an overfitting problem during the model optimization process.
- the purpose of the embodiments of the present application is to propose a model optimization method, device, computer equipment and storage medium applied to momentum gradient descent, so as to solve the problem that the traditional model optimization method will overfit the Embedding layer during the model optimization process. .
- the embodiments of the present application provide a model optimization method applied to momentum gradient descent, which adopts the following technical solutions:
- model optimization request sent by the user terminal, where the model optimization request at least carries the original prediction model and the original training data set;
- the gradient data corresponding to the initial decision parameter needs to be updated in the calculation of the current round
- the embodiment of the present application also provides a model optimization device applied to momentum gradient descent, which adopts the following technical solutions:
- a request receiving module configured to receive a model optimization request sent by the user terminal, where the model optimization request at least carries the original prediction model and the original training data set;
- a sampling operation module used for sampling operation in the original training data set to obtain the training data set of this round
- a function definition module for defining an objective function based on the current round of training data sets
- an initialization module for initializing the model optimization parameters of the original prediction model to obtain initial speed parameters and initial decision-making parameters
- a gradient calculation module used to calculate the gradient data corresponding to the initial decision parameter that needs to be updated in this round
- a gradient judgment module for judging whether the gradient data has been updated
- An abnormality confirmation module used for outputting a sampling abnormality signal if the gradient data is not updated
- a speed parameter update module configured to update the initial speed parameter based on the gradient data to obtain an update speed if the gradient data has been updated
- a decision parameter update module configured to update the initial decision parameter based on the update speed to obtain an update decision parameter
- a target model obtaining module configured to obtain a target prediction model when the initial decision parameters and the updated decision parameters satisfy a convergence condition.
- the embodiment of the present application also provides a computer device, which adopts the following technical solutions:
- the memory stores computer-readable instructions
- the processor executes the computer-readable instructions, the processor implements the steps of the model optimization method applied to the momentum gradient descent as described below:
- model optimization request sent by the user terminal, where the model optimization request at least carries the original prediction model and the original training data set;
- the gradient data corresponding to the initial decision parameter needs to be updated in the calculation of the current round
- the embodiments of the present application also provide a computer-readable storage medium, which adopts the following technical solutions:
- the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, implements the steps of the model optimization method applied to the momentum gradient descent as described below:
- model optimization request sent by the user terminal, where the model optimization request at least carries the original prediction model and the original training data set;
- the gradient data corresponding to the initial decision parameter needs to be updated in the calculation of the current round
- the model optimization method, device, computer equipment and storage medium applied to momentum gradient descent provided by the embodiments of the present application mainly have the following beneficial effects:
- the present application provides a model optimization method applied to momentum gradient descent, which receives a model optimization request sent by a user terminal, where the model optimization request at least carries an original prediction model and an original training data set; Sampling operation to obtain the current round of training data sets; define an objective function based on the current round of training data sets; initialize model optimization algorithm parameters to obtain initial speed parameters and initial decision parameters; calculate the gradient corresponding to the initial decision parameters that need to be updated in this round data; determine whether the gradient data has been updated; if the gradient data has not been updated, output a sampling abnormal signal; if the gradient data has been updated, update the initial speed parameter based on the gradient data to obtain an update speed; The initial decision parameter is updated based on the update speed to obtain an updated decision parameter; when the initial decision parameter and the updated decision parameter satisfy a convergence condition, a target prediction model is obtained.
- the training data of the current round is not sampled, and the gradient update of this round will still use historical momentum to update, which may lead to overfitting of the Embedding layer.
- the training data of this round is confirmed to be sampled, and then the gradient update operation is performed, thereby effectively avoiding the words that have not been sampled in the current batch during training, and the history will still be used.
- Momentum to update causes the problem of overfitting of the Embedding layer.
- Fig. 1 is the realization flow chart of the model optimization method applied to momentum gradient descent provided by the first embodiment of the present application;
- Fig. 2 is the realization flow chart of step S103 in Fig. 1;
- Fig. 3 is the realization flow chart of step S110 in Fig. 1;
- Embodiment 4 is a schematic structural diagram of a model optimization device applied to momentum gradient descent provided by Embodiment 2 of the present application;
- Fig. 5 is the structural representation of function definition module 103 in Fig. 4;
- FIG. 6 is a schematic structural diagram of an embodiment of a computer device according to the present application.
- FIG. 1 shows the implementation flow chart of the model optimization method applied to the momentum gradient descent provided according to the first embodiment of the present application. For the convenience of description, only the part related to the present application is shown.
- step S101 a model optimization request sent by a user terminal is received, where the model optimization request at least carries the original prediction model and the original training data set.
- a user terminal refers to a terminal device used to execute the image processing method for preventing credential abuse provided by the present application
- the current terminal may be, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, Mobile terminals such as PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), navigation devices, etc., as well as stationary terminals such as digital TVs, desktop computers, etc.
- PDAs Personal Digital Assistants
- PADs Tablett Computers
- PMPs Portable Multimedia Players
- navigation devices etc.
- stationary terminals such as digital TVs, desktop computers, etc.
- the examples are only for the convenience of understanding, and are not used to limit the present application.
- the original prediction model is not a prediction model optimized by gradient descent.
- step S102 a sampling operation is performed in the original training data set to obtain the current round of training data sets.
- the sampling operation refers to the process of extracting individuals or samples from the overall training data, that is, the process of performing experiments or observations on the overall training data.
- the former refers to a sampling method that draws samples from the population in accordance with the principle of randomization, without any subjectivity, including simple random sampling, systematic sampling, cluster sampling and stratified sampling.
- the latter is a method of extracting samples based on the researcher's point of view, experience or related knowledge, with obvious subjective color.
- the training data set of the current round refers to a training data set with a small amount of data selected after the above sampling operation, so as to reduce the training time of the model.
- step S103 an objective function is defined based on the current round of training data sets.
- a user-text matrix R may be generated based on a data set of user texts, and the user-text matrix R may be decomposed based on the singular value decomposition method to obtain a user-hidden feature matrix P and a latent feature-text matrix Q.
- construct the objective function based on the user-text matrix R objective function Expressed as:
- R ( ⁇ ) represents the user-text matrix R user's scoring data set of text
- p m ⁇ represents the latent feature corresponding to the mth user in the user-hidden feature matrix P
- q n ⁇ represents the latent feature-text matrix Q
- the hidden feature corresponding to the n-th text in ; r m,n represents the rating data of user m for text n; Represents the rating data of user m to text n in the rating data set;
- ⁇ 2 represents the regularization factor of the latent feature matrix.
- step S104 the model optimization parameters of the original prediction model are initialized to obtain initial speed parameters and initial decision parameters.
- initialization is to assign a variable to a default value and a control to a default state. Specifically, it includes an initialization learning rate ⁇ , a momentum parameter ⁇ , an initial decision parameter ⁇ , and an initial velocity v.
- step S105 the gradient data corresponding to the initial decision parameters that need to be updated in the current round is calculated.
- the gradient data is expressed as:
- g represents the gradient data
- m represents the total number of training data in this round
- ⁇ represents the initial decision parameter
- x (i) represents the i-th training data in this round
- step S106 it is determined whether the gradient data has been updated.
- the gradient of its Embedding is not 0. Based on the characteristics of the sampling, it is possible to know whether the training data has been sampled by judging whether the gradient data has been updated.
- step S107 if the gradient data is not updated, a sampling abnormal signal is output.
- the gradient data has not been updated, it means that the training data has not been sampled before performing subsequent update operations, and there is no training data that has been repeatedly sampled, and the corresponding Embedding layer will also be repeatedly trained based on historical momentum. Update, resulting in overfitting.
- step S108 if the gradient data has been updated, the initial speed parameter is updated based on the gradient data to obtain the update speed.
- the update speed is expressed as:
- v new represents the update speed
- v old represents the initial speed parameter
- ⁇ represents the momentum parameter
- ⁇ represents the learning rate
- g represents the gradient data.
- step S109 the initial decision parameter is updated based on the update speed to obtain the update decision parameter.
- the update decision parameter is expressed as:
- ⁇ new represents the update decision parameter
- ⁇ old represents the initial decision parameter
- v new represents the update speed
- step S110 when the initial decision parameters and the updated decision parameters satisfy the convergence condition, a target prediction model is obtained.
- the model optimization method applied to momentum gradient descent receives a model optimization request sent by a user terminal, and the model optimization request carries at least the original prediction model and the original training data set; the sampling operation is performed in the original training data set, Obtain the training data set of this round; define the objective function based on the training data set of this round; initialize the parameters of the model optimization algorithm to obtain the initial speed parameters and initial decision parameters; calculate the gradient data corresponding to the initial decision parameters that need to be updated in this round; judge whether the gradient data has been Update; if the gradient data is not updated, the sampling abnormal signal is output; if the gradient data has been updated, the initial speed parameter is updated based on the gradient data to obtain the update speed; the initial decision parameter is updated based on the update speed, and the updated decision parameter is obtained; when the initial decision parameter And when the updated decision parameters meet the convergence conditions, the target prediction model is obtained.
- the training data of the current round is not sampled, and the gradient update of this round will still use historical momentum to update, which may lead to overfitting of the Embedding layer.
- the gradient confirm whether the gradient data has been updated, so as to confirm that the training data of this round is definitely sampled, and then perform the gradient update operation, thereby effectively avoiding the words that have not been sampled in the current batch during training, and still use the history.
- Momentum to update causes the problem of overfitting of the Embedding layer.
- step S103 in FIG. 1 a flowchart of the implementation of step S103 in FIG. 1 is shown. For the convenience of description, only the parts related to the present application are shown.
- step S103 specifically includes: step S201 , step S202 and step S203 .
- step S201 a user-text matrix R is generated based on a data set of user texts.
- step S202 the user-text matrix R is decomposed based on the singular value decomposition method to obtain the user-hidden feature matrix P and the latent feature-text matrix Q.
- singular value decomposition is an important matrix decomposition in linear algebra, and singular value decomposition is a generalization of eigen decomposition on any matrix.
- step S203 an objective function is constructed based on the user-text matrix R.
- R ( ⁇ ) represents the user-text matrix R user's scoring data set of text
- p m ⁇ represents the latent feature corresponding to the mth user in the user-hidden feature matrix P
- q n ⁇ represents the latent feature-text matrix Q
- the hidden feature corresponding to the n-th text in ; r m,n represents the rating data of user m for text n; Represents the rating data of user m to text n in the rating data set;
- ⁇ 2 represents the regularization factor of the latent feature matrix.
- step S110 in FIG. 1 a flowchart of the implementation of step S110 in FIG. 1 is shown. For the convenience of description, only the parts related to the present application are shown.
- step S110 specifically includes: step S301 , step S302 , step S303 and step S304 .
- step S301 the initial decision parameter and the decision parameter difference of the updated decision parameter are calculated.
- the difference value of the decision parameter is mainly used to judge the change amount of the current model parameter and the model parameter of the previous round.
- the change amount is less than a certain value, it is considered that the decision parameter tends to a certain stable value, so that the The predictive model reaches stability.
- step S302 it is determined whether the decision parameter difference is smaller than a preset convergence threshold.
- the user can adjust the preset convergence threshold according to the actual situation.
- step S303 if the decision parameter difference is less than or equal to the preset convergence threshold, it is determined that the current prediction model is converged, and the current prediction model is used as the target prediction model.
- the decision parameter difference when the decision parameter difference is less than or equal to the preset convergence threshold, it means that the decision parameter tends to a certain stable value, and the prediction model is stable.
- step S304 if the difference of the decision parameters is greater than the preset convergence threshold, it is determined that the current prediction model has not converged, and the parameter optimization operation is continued.
- the difference of the decision parameters when the difference of the decision parameters is greater than the preset convergence threshold, it means that the decision parameters have not reached a certain stable value, and the parameters of the prediction model still need to be optimized.
- the gradient data is represented as:
- g represents the gradient data
- m represents the total number of training data in this round
- ⁇ represents the initial decision parameter
- x (i) represents the i-th training data in this round
- the update speed is expressed as:
- v new represents the update speed
- v old represents the initial speed parameter
- ⁇ represents the momentum parameter
- ⁇ represents the learning rate
- g represents the gradient data.
- the update decision parameter is expressed as:
- ⁇ new represents the update decision parameter
- ⁇ old represents the initial decision parameter
- v new represents the update speed
- the model optimization method applied to momentum gradient descent receives a model optimization request sent by a user terminal, and the model optimization request at least carries the original prediction model and the original training data set; Sampling operation to obtain the training data set of this round; define the objective function based on the training data set of this round; initialize the parameters of the model optimization algorithm to obtain the initial speed parameters and initial decision parameters; calculate the gradient data corresponding to the initial decision parameters that need to be updated in this round; judge the gradient Whether the data has been updated; if the gradient data has not been updated, output a sampling abnormal signal; if the gradient data has been updated, update the initial speed parameter based on the gradient data to obtain the update speed; update the initial decision parameter based on the update speed to obtain the update decision parameter; when When the initial decision parameters and the updated decision parameters satisfy the convergence conditions, the target prediction model is obtained.
- the training data of the current round is not sampled, and the gradient update of this round will still use historical momentum to update, which may lead to overfitting of the Embedding layer.
- the training data of this round is confirmed to be sampled, and then the gradient update operation is performed, thereby effectively avoiding the words that have not been sampled in the current batch during training, and the history will still be used.
- Momentum to update causes the problem of overfitting of the Embedding layer.
- the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
- the present application provides an embodiment of a model optimization device applied to momentum gradient descent, which is similar to the method embodiment shown in FIG. 1 .
- the apparatus can be specifically applied to various electronic devices.
- the model optimization device 100 applied to momentum gradient descent in this embodiment includes: a request receiving module 101 , a sampling operation module 102 , a function definition module 103 , an initialization module 104 , a gradient calculation module 105 , and a gradient judgment module 106 , an abnormality confirmation module 107 , a speed parameter update module 108 , a decision parameter update module 109 and a target model acquisition module 110 .
- a request receiving module 101 a sampling operation module 102
- a function definition module 103 the initialization module 104
- a gradient calculation module 105 includes a gradient calculation module 105 , and a gradient judgment module 106 , an abnormality confirmation module 107 , a speed parameter update module 108 , a decision parameter update module 109 and a target model acquisition module 110 .
- a request receiving module 101 configured to receive a model optimization request sent by a user terminal, where the model optimization request at least carries the original prediction model and the original training data set;
- the sampling operation module 102 is used to perform sampling operation in the original training data set to obtain the training data set of this round;
- the function definition module 103 is used to define an objective function based on the current round of training data sets
- the initialization module 104 is used to initialize the model optimization parameters of the original prediction model to obtain initial speed parameters and initial decision parameters;
- the gradient calculation module 105 is used to calculate the gradient data corresponding to the initial decision parameter that needs to be updated in this round;
- the gradient judgment module 106 is used for judging whether the gradient data has been updated
- An abnormality confirmation module 107 configured to output a sampling abnormality signal if the gradient data is not updated
- a speed parameter update module 108 configured to update the initial speed parameter based on the gradient data to obtain the update speed if the gradient data has been updated;
- a decision parameter update module 109 configured to update the initial decision parameter based on the update speed to obtain the updated decision parameter
- the target model obtaining module 110 is configured to obtain the target prediction model when the initial decision parameters and the updated decision parameters satisfy the convergence condition.
- a user terminal refers to a terminal device used to execute the image processing method for preventing credential abuse provided by the present application
- the current terminal may be, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, Mobile terminals such as PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), navigation devices, etc., as well as stationary terminals such as digital TVs, desktop computers, etc.
- PDAs Personal Digital Assistants
- PADs Tablett Computers
- PMPs Portable Multimedia Players
- navigation devices etc.
- stationary terminals such as digital TVs, desktop computers, etc.
- the examples are only for the convenience of understanding, and are not used to limit the present application.
- the original prediction model is not a prediction model optimized by gradient descent.
- the sampling operation refers to the process of extracting individuals or samples from the overall training data, that is, the process of performing experiments or observations on the overall training data.
- the former refers to a sampling method that draws samples from the population in accordance with the principle of randomization, without any subjectivity, including simple random sampling, systematic sampling, cluster sampling and stratified sampling.
- the latter is a method of extracting samples based on the researcher's point of view, experience or related knowledge, with obvious subjective color.
- the training data set of the current round refers to a training data set with a small amount of data selected after the above sampling operation, so as to reduce the training time of the model.
- a user-text matrix R may be generated based on a data set of user texts, and the user-text matrix R may be decomposed based on the singular value decomposition method to obtain a user-hidden feature matrix P and a latent feature-text matrix Q.
- construct the objective function based on the user-text matrix R objective function Expressed as:
- R ( ⁇ ) represents the user-text matrix R user's scoring data set of text
- p m ⁇ represents the latent feature corresponding to the mth user in the user-hidden feature matrix P
- q n ⁇ represents the latent feature-text matrix Q
- the hidden feature corresponding to the n-th text in ; r m,n represents the rating data of user m for text n; Represents the rating data of user m to text n in the rating data set;
- ⁇ 2 represents the regularization factor of the latent feature matrix.
- initialization is to assign a variable to a default value and a control to a default state. Specifically, it includes an initialization learning rate ⁇ , a momentum parameter ⁇ , an initial decision parameter ⁇ , and an initial velocity v.
- the gradient data is expressed as:
- g represents the gradient data
- m represents the total number of training data in this round
- ⁇ represents the initial decision parameter
- x (i) represents the i-th training data in this round
- the gradient of its Embedding is not 0. Based on the characteristics of the sampling, it can be known whether the training data has been sampled by judging whether the gradient data has been updated.
- the gradient data has not been updated, it means that the training data has not been sampled before performing subsequent update operations, and there is no training data that has been repeatedly sampled, and the corresponding Embedding layer will also be repeatedly trained based on historical momentum. Update, resulting in overfitting.
- the update speed is expressed as:
- v new represents the update speed
- v old represents the initial speed parameter
- ⁇ represents the momentum parameter
- ⁇ represents the learning rate
- g represents the gradient data.
- the update decision parameter is expressed as:
- ⁇ new represents the update decision parameter
- ⁇ old represents the initial decision parameter
- v new represents the update speed
- FIG. 5 a schematic structural diagram of the function definition module 103 in FIG. 4 is shown. For the convenience of description, only the parts related to the present application are shown.
- the function definition module 103 specifically includes: a matrix generation submodule 1031 , a matrix decomposition submodule 1032 , and a function construction submodule 1033 . in:
- a matrix generation submodule 1031 configured to generate a user-text matrix based on a data set of user texts
- the matrix decomposition submodule 1032 is configured to perform a decomposition operation on the user-text matrix based on the singular value decomposition method to obtain the user-hidden feature matrix and the latent feature-text matrix;
- the function construction sub-module 1033 is used to construct an objective function based on the user-text matrix.
- singular value decomposition is an important matrix decomposition in linear algebra, and singular value decomposition is a generalization of eigen decomposition on any matrix.
- R ( ⁇ ) represents the user-text matrix R user's scoring data set of text
- p m ⁇ represents the latent feature corresponding to the mth user in the user-hidden feature matrix P
- q n ⁇ represents the latent feature-text matrix Q
- the hidden feature corresponding to the n-th text in ; r m,n represents the rating data of user m for text n; Represents the rating data of user m to text n in the rating data set;
- ⁇ 2 represents the regularization factor of the latent feature matrix.
- the gradient data is represented as:
- g represents the gradient data
- m represents the total number of training data in this round
- ⁇ represents the initial decision parameter
- x (i) represents the i-th training data in this round
- the update speed is expressed as:
- v new represents the update speed
- v old represents the initial speed parameter
- ⁇ represents the momentum parameter
- ⁇ represents the learning rate
- g represents the gradient data.
- the update decision parameter is expressed as:
- ⁇ new represents the update decision parameter
- ⁇ old represents the initial decision parameter
- v new represents the update speed
- the target model obtaining module 110 specifically includes: a difference calculation submodule, a convergence judgment submodule, a convergence confirmation submodule, and a non-convergence confirmation submodule. in:
- a difference calculation submodule configured to calculate the difference between the initial decision parameter and the decision parameter of the updated decision parameter
- a convergence judgment submodule configured to judge whether the decision parameter difference is less than the preset convergence threshold
- a convergence confirmation submodule configured to determine that the current prediction model is converged if the decision parameter difference is less than or equal to the preset convergence threshold, and use the current prediction model as the target prediction model;
- the non-convergence confirmation sub-module is configured to determine that the current prediction model is not converged and continue to perform the parameter optimization operation if the decision parameter difference is greater than the preset convergence threshold.
- the model optimization device applied to momentum gradient descent includes: a request receiving module, configured to receive a model optimization request sent by a user terminal, where the model optimization request at least carries the original prediction model and original training data set; the sampling operation module is used to perform sampling operation in the original training data set to obtain the current round of training data set; the function definition module is used to define the objective function based on the current round of training data set; the initialization module is used to initialize the original prediction model
- the model optimizes the parameters to obtain the initial speed parameters and the initial decision parameters; the gradient calculation module is used to calculate the gradient data corresponding to the initial decision parameters that need to be updated in this round; the gradient judgment module is used to judge whether the gradient data has been updated; the abnormal confirmation module is used to If the gradient data has not been updated, the sampling abnormal signal will be output; the speed parameter update module is used to update the initial speed parameter based on the gradient data if the gradient data has been updated to obtain the update speed; the decision parameter update module is used to update based on
- the initial decision parameters are used to obtain the updated decision parameters; the target model acquisition module is used to obtain the target prediction model when the initial decision parameters and the updated decision parameters satisfy the convergence condition.
- the training data of the current round is not sampled, and the gradient update of this round will still use historical momentum to update, which may lead to overfitting of the Embedding layer.
- the training data of this round is confirmed to be sampled, and then the gradient update operation is performed, thereby effectively avoiding the words that have not been sampled in the current batch during training, and the history will still be used.
- Momentum to update causes the problem of overfitting of the Embedding layer.
- FIG. 6 is a block diagram of the basic structure of a computer device according to this embodiment.
- the computer device 200 includes a memory 210 , a processor 220 , and a network interface 230 that communicate with each other through a system bus. It should be noted that only the computer device 200 with components 210-230 is shown in the figure, but it should be understood that implementation of all of the shown components is not required, and more or less components may be implemented instead.
- the computer device here is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, special-purpose Integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- DSP Digital Signal Processor
- embedded equipment etc.
- the computer equipment may be a desktop computer, a notebook computer, a palmtop computer, a cloud server and other computing equipment.
- the computer device can perform human-computer interaction with the user through a keyboard, a mouse, a remote control, a touch pad or a voice control device.
- the memory 210 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (eg, SD or DX memory, etc.), random access memory (RAM), static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
- the computer readable storage Media can be non-volatile or volatile.
- the memory 210 may be an internal storage unit of the computer device 200 , such as a hard disk or a memory of the computer device 200 .
- the memory 210 may also be an external storage device of the computer device 200, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
- the memory 210 may also include both the internal storage unit of the computer device 200 and its external storage device.
- the memory 210 is generally used to store the operating system and various application software installed in the computer device 200, such as computer-readable instructions applied to the model optimization method of momentum gradient descent.
- the memory 210 can also be used to temporarily store various types of data that have been output or will be output.
- the processor 220 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
- the processor 220 is typically used to control the overall operation of the computer device 200 .
- the processor 220 is configured to execute the computer-readable instructions stored in the memory 210 or process data, for example, the computer-readable instructions for executing the model optimization method applied to momentum gradient descent.
- the network interface 230 may include a wireless network interface or a wired network interface, and the network interface 230 is generally used to establish a communication connection between the computer device 200 and other electronic devices.
- the present application also provides another embodiment, that is, to provide a computer-readable storage medium, where the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to The at least one processor is caused to perform the steps of the model optimization method applied to momentum gradient descent as described above.
- the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
- the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
- a storage medium such as ROM/RAM, magnetic disk, CD-ROM
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Databases & Information Systems (AREA)
- Machine Translation (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
一种应用于动量梯度下降的模型优化方法、装置、计算机设备及存储介质。所述方法包括:接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集(S101);在所述原始训练数据集中进行采样操作,得到本轮训练数据集(S102);基于所述本轮训练数据集定义目标函数(S103);初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数(S104);计算本轮需要更新所述初始决策参数对应的梯度数据(S105);判断所述梯度数据是否已更新(S106);若所述梯度数据未更新,则输出采样异常信号(S107);若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度(S108);基于所述更新速度更新所述初始决策参数,得到更新决策参数(S109);当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型(S110)。可以有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
Description
本申请以2020年11月27日提交的申请号为202011359384.8,名称为“一种模型优化方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
本申请涉及人工智能的模型优化,尤其涉及一种应用于动量梯度下降的模型优化方法、装置、计算机设备及存储介质。
最优化问题是计算数学中最为重要的研究方向之一。在深度学习领域,优化算法同样是关键环节之一。即使完全相同的数据集与模型架构,不同的优化算法也很可能导致不同的训练结果,甚至有的模型出现不收敛现象。
现有一种模型优化方法,在深度学习的模型训练过程中,采用指数加权移动平均的方式,基于积攒了历史梯度的动量对该模型进行训练,以提高该模型的准确率。
然而,申请人意识到申请人发现传统的模型优化方法普遍不智能,在模型优化的过程中Embedding层会出现过拟合的问题。
发明内容
本申请实施例的目的在于提出一种应用于动量梯度下降的模型优化方法、装置、计算机设备及存储介质,以解决传统的模型优化方法在模型优化的过程中Embedding层会出现过拟合的问题。
为了解决上述技术问题,本申请实施例提供一种应用于动量梯度下降的模型优化方法,采用了如下所述的技术方案:
接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;
在所述原始训练数据集中进行采样操作,得到本轮训练数据集;
基于所述本轮训练数据集定义目标函数;
初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;
计算本轮需要更新所述初始决策参数对应的梯度数据;
判断所述梯度数据是否已更新;
若所述梯度数据未更新,则输出采样异常信号;
若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;
基于所述更新速度更新所述初始决策参数,得到更新决策参数;
当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
为了解决上述技术问题,本申请实施例还提供一种应用于动量梯度下降的模型优化装置,采用了如下所述的技术方案:
请求接收模块,用于接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;
采样操作模块,用于在所述原始训练数据集中进行采样操作,得到本轮训练数据集;
函数定义模块,用于基于所述本轮训练数据集定义目标函数;
初始化模块,用于初始化所述原始预测模型的模型优化参数,得到初始速度参数以及 初始决策参数;
梯度计算模块,用于计算本轮需要更新所述初始决策参数对应的梯度数据;
梯度判断模块,用于判断所述梯度数据是否已更新;
异常确认模块,用于若所述梯度数据未更新,则输出采样异常信号;
速度参数更新模块,用于若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;
决策参数更新模块,用于基于所述更新速度更新所述初始决策参数,得到更新决策参数;
目标模型获取模块,用于当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
为了解决上述技术问题,本申请实施例还提供一种计算机设备,采用了如下所述的技术方案:
包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的应用于动量梯度下降的模型优化方法的步骤:
接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;
在所述原始训练数据集中进行采样操作,得到本轮训练数据集;
基于所述本轮训练数据集定义目标函数;
初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;
计算本轮需要更新所述初始决策参数对应的梯度数据;
判断所述梯度数据是否已更新;
若所述梯度数据未更新,则输出采样异常信号;
若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;
基于所述更新速度更新所述初始决策参数,得到更新决策参数;
当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,采用了如下所述的技术方案:
所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的应用于动量梯度下降的模型优化方法的步骤:
接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;
在所述原始训练数据集中进行采样操作,得到本轮训练数据集;
基于所述本轮训练数据集定义目标函数;
初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;
计算本轮需要更新所述初始决策参数对应的梯度数据;
判断所述梯度数据是否已更新;
若所述梯度数据未更新,则输出采样异常信号;
若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;
基于所述更新速度更新所述初始决策参数,得到更新决策参数;
当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
与现有技术相比,本申请实施例提供的应用于动量梯度下降的模型优化方法、装置、计算机设备及存储介质主要有以下有益效果:
本申请提供了一种应用于动量梯度下降的模型优化方法,接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;在所述原始训练数据集中进行采样操作,得到本轮训练数据集;基于所述本轮训练数据集定义目标函数;初始化模型优化算法参数,得到初始速度参数以及初始决策参数;计算本轮需要更新所述 初始决策参数对应的梯度数据;判断所述梯度数据是否已更新;若所述梯度数据未更新,则输出采样异常信号;若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;基于所述更新速度更新所述初始决策参数,得到更新决策参数;当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例一提供的应用于动量梯度下降的模型优化方法的实现流程图;
图2是图1中步骤S103的实现流程图;
图3是图1中步骤S110的实现流程图;
图4是本申请实施例二提供的应用于动量梯度下降的模型优化装置的结构示意图;
图5是图4中函数定义模块103的结构示意图;
图6是根据本申请的计算机设备的一个实施例的结构示意图。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。
实施例一
如图1所示,示出了根据本申请实施例一提供的应用于动量梯度下降的模型优化方法的实现流程图,为了便于说明,仅示出与本申请相关的部分。
在步骤S101中,接收用户终端发送的模型优化请求,模型优化请求至少携带有原始预测模型以及原始训练数据集。
在本申请实施例中,用户终端指的是用于执行本申请提供的预防证件滥用的图像处理方法的终端设备,该当前终端可以是诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端,应当理解,此处对用户终端的举例仅为方便理解,不用于限定本申请。
在本申请实施例中,原始预测模型未进行梯度下降优化的预测模型。
在步骤S102中,在原始训练数据集中进行采样操作,得到本轮训练数据集。
在本申请实施例中,采样操作是指从总体训练数据中抽取个体或样品的过程,也即对总体训练数据进行试验或观测的过程。分随机抽样和非随机抽样两种类型。前者指遵照随机化原则从总体中抽取样本的抽样方法,它不带任何主观性,包括简单随机抽样、系统抽样、整群抽样和分层抽样。后者是一种凭研究者的观点、经验或者有关知识来抽取样本的方法,带有明显主观色彩。
在本申请实施例中,本轮训练数据集指的是经过上述采样操作后筛选出的数据量较小的训练数据集,以减少模型的训练时间。
在步骤S103中,基于本轮训练数据集定义目标函数。
在本申请实施例中,可基于用户文本的数据集生成用户-文本矩阵R,基于奇异值分解法对用户-文本矩阵R进行分解操作,得到用户-隐特征矩阵P以及隐特征-文本矩阵Q,基于用户-文本矩阵R构造目标函数
目标函数
表示为:
其中,R
(Λ)表示用户-文本矩阵R用户对文本的评分数据集合;p
m`表示用户-隐特征矩阵P中第m个用户对应的隐特征;q
n`表示隐特征-文本矩阵Q中第n个文本对应的隐特征;r
m,n表示用户m对文本n的评分数据;
表示评分数据集合中用户m对文本n的评分数据;λ
2表示隐特征矩阵的正则化因子。
在步骤S104中,初始化原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数。
在本申请实施例中,初始化就是把变量赋为默认值,把控件设为默认状态,具体的,包括初始化学习率∈、动量参数α、初始决策参数θ和初始速度v。
在步骤S105中,计算本轮需要更新初始决策参数对应的梯度数据。
在本申请实施例中,梯度数据表示为:
在步骤S106中,判断梯度数据是否已更新。
在本申请实施例中,当一个训练数据被采样过后,它的Embedding的梯度不为0,基于该采样的特征,通过判断梯度数据是否已更新,即可获知该训练数据是否被采样过。
在步骤S107中,若梯度数据未更新,则输出采样异常信号。
在本申请实施例中,若梯度数据未更新,则说明该训练数据没有被采样过便进行后续的更新操作,没有被反复采样的训练数据,对应的Embedding层基于历史动量也会被被反复训练更新,导致了过拟合情况发生。
在步骤S108中,若梯度数据已更新,则基于梯度数据更新初始速度参数,得到更新速度。
在本申请实施例中,更新速度表示为:
v
new=αv
old-∈g
其中,v
new表示更新速度;v
old表示初始速度参数;α表示动量参数;∈表示学习率;g表示梯度数据。
在步骤S109中,基于更新速度更新初始决策参数,得到更新决策参数。
在本申请实施例中,更新决策参数表示为:
θ
new=θ
old+v
new
其中,θ
new表示更新决策参数;θ
old表示初始决策参数;v
new表示更新速度。
在步骤S110中,当初始决策参数以及更新决策参数满足收敛条件时,得到目标预测模型。
本申请实施例一提供的应用于动量梯度下降的模型优化方法,接收用户终端发送的模型优化请求,模型优化请求至少携带有原始预测模型以及原始训练数据集;在原始训练数据集中进行采样操作,得到本轮训练数据集;基于本轮训练数据集定义目标函数;初始化模型优化算法参数,得到初始速度参数以及初始决策参数;计算本轮需要更新初始决策参数对应的梯度数据;判断梯度数据是否已更新;若梯度数据未更新,则输出采样异常信号;若梯度数据已更新,则基于梯度数据更新初始速度参数,得到更新速度;基于更新速度更新初始决策参数,得到更新决策参数;当初始决策参数以及更新决策参数满足收敛条件时,得到目标预测模型。由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
继续参阅图2,示出了图1中步骤S103的实现流程图,为了便于说明,仅示出与本申请相关的部分。
在本申请实施例一的一些可选的实现方式中,上述步骤S103具体包括:步骤S201、步骤S202以及步骤S203。
在步骤S201中,基于用户文本的数据集生成用户-文本矩阵R。
在步骤S202中,基于奇异值分解法对用户-文本矩阵R进行分解操作,得到用户-隐特征矩阵P以及隐特征-文本矩阵Q。
在本申请实施例中,奇异值分解(Singular Value Decomposition)是线性代数中一种重要的矩阵分解,奇异值分解则是特征分解在任意矩阵上的推广。
在步骤S203中,基于用户-文本矩阵R构造目标函数。
其中,R
(Λ)表示用户-文本矩阵R用户对文本的评分数据集合;p
m`表示用户-隐特征矩阵P中第m个用户对应的隐特征;q
n`表示隐特征-文本矩阵Q中第n个文本对应的隐特征;r
m,n表示用户m对文本n的评分数据;
表示评分数据集合中用户m对文本n的评分数据;λ
2表示隐特征矩阵的正则化因子。
继续参阅图3,示出了图1中步骤S110的实现流程图,为了便于说明,仅示出与本申请相关的部分。
在本申请实施例一的一些可选的实现方式中,上述步骤S110具体包括:步骤S301、步骤S302、步骤S303以及步骤S304。
在步骤S301中,计算初始决策参数以及更新决策参数的决策参数差值。
在本申请实施例中,决策参数差值主要用于判断当前模型参数与上轮模型参数的变化量,当该变化量小于一定数值时,则认为决策参数趋向于某个稳定的数值,以使得该预测模型达到稳定。
在步骤S302中,判断决策参数差值是否小于预设收敛阈值。
在本申请实施例中,用户可以根据实际情况调整预设收敛阈值。
在步骤S303中,若决策参数差值小于或等于预设收敛阈值,则确定当前的预测模型收敛,并将当前的预测模型作为目标预测模型。
在本申请实施例中,当决策参数差值小于或等于预设收敛阈值,则说明决策参数趋向 于某个稳定的数值,该预测模型达到稳定。
在步骤S304中,若决策参数差值大于预设收敛阈值,则则确定当前的预测模型未收敛,继续执行参数优化操作。
在本申请实施例中,当决策参数差值大于预设收敛阈值,则说明决策参数未达到某个稳定的数值,该预测模型的参数仍然需要进行优化。
在本申请实施例一的一些可选的实现方式中,梯度数据表示为:
在本申请实施例一的一些可选的实现方式中,更新速度表示为:
v
new=αv
old-∈g
其中,v
new表示更新速度;v
old表示初始速度参数;α表示动量参数;∈表示学习率;g表示梯度数据。
在本申请实施例一的一些可选的实现方式中,更新决策参数表示为:
θ
new=θ
old+v
new
其中,θ
new表示更新决策参数;θ
old表示初始决策参数;v
new表示更新速度。
综上,本申请实施例一提供的应用于动量梯度下降的模型优化方法,接收用户终端发送的模型优化请求,模型优化请求至少携带有原始预测模型以及原始训练数据集;在原始训练数据集中进行采样操作,得到本轮训练数据集;基于本轮训练数据集定义目标函数;初始化模型优化算法参数,得到初始速度参数以及初始决策参数;计算本轮需要更新初始决策参数对应的梯度数据;判断梯度数据是否已更新;若梯度数据未更新,则输出采样异常信号;若梯度数据已更新,则基于梯度数据更新初始速度参数,得到更新速度;基于更新速度更新初始决策参数,得到更新决策参数;当初始决策参数以及更新决策参数满足收敛条件时,得到目标预测模型。由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
实施例二
进一步参考图4,作为对上述图1所示方法的实现,本申请提供了一种应用于动量梯度下降的模型优化装置的一个实施例,该装置实施例与图1所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图4所示,本实施例的应用于动量梯度下降的模型优化装置100包括:请求接收模块101、采样操作模块102、函数定义模块103、初始化模块104、梯度计算模块105、梯度判断模块106、异常确认模块107、速度参数更新模块108、决策参数更新模块109以及 目标模型获取模块110。其中:
请求接收模块101,用于接收用户终端发送的模型优化请求,模型优化请求至少携带有原始预测模型以及原始训练数据集;
采样操作模块102,用于在原始训练数据集中进行采样操作,得到本轮训练数据集;
函数定义模块103,用于基于本轮训练数据集定义目标函数;
初始化模块104,用于初始化原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;
梯度计算模块105,用于计算本轮需要更新初始决策参数对应的梯度数据;
梯度判断模块106,用于判断梯度数据是否已更新;
异常确认模块107,用于若梯度数据未更新,则输出采样异常信号;
速度参数更新模块108,用于若梯度数据已更新,则基于梯度数据更新初始速度参数,得到更新速度;
决策参数更新模块109,用于基于更新速度更新初始决策参数,得到更新决策参数;
目标模型获取模块110,用于当初始决策参数以及更新决策参数满足收敛条件时,得到目标预测模型。
在本申请实施例中,用户终端指的是用于执行本申请提供的预防证件滥用的图像处理方法的终端设备,该当前终端可以是诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端,应当理解,此处对用户终端的举例仅为方便理解,不用于限定本申请。
在本申请实施例中,原始预测模型未进行梯度下降优化的预测模型。
在本申请实施例中,采样操作是指从总体训练数据中抽取个体或样品的过程,也即对总体训练数据进行试验或观测的过程。分随机抽样和非随机抽样两种类型。前者指遵照随机化原则从总体中抽取样本的抽样方法,它不带任何主观性,包括简单随机抽样、系统抽样、整群抽样和分层抽样。后者是一种凭研究者的观点、经验或者有关知识来抽取样本的方法,带有明显主观色彩。
在本申请实施例中,本轮训练数据集指的是经过上述采样操作后筛选出的数据量较小的训练数据集,以减少模型的训练时间。
在本申请实施例中,可基于用户文本的数据集生成用户-文本矩阵R,基于奇异值分解法对用户-文本矩阵R进行分解操作,得到用户-隐特征矩阵P以及隐特征-文本矩阵Q,基于用户-文本矩阵R构造目标函数
目标函数
表示为:
其中,R
(Λ)表示用户-文本矩阵R用户对文本的评分数据集合;p
m`表示用户-隐特征矩阵P中第m个用户对应的隐特征;q
n`表示隐特征-文本矩阵Q中第n个文本对应的隐特征;r
m,n表示用户m对文本n的评分数据;
表示评分数据集合中用户m对文本n的评分数据;λ
2表示隐特征矩阵的正则化因子。
在本申请实施例中,初始化就是把变量赋为默认值,把控件设为默认状态,具体的,包括初始化学习率∈、动量参数α、初始决策参数θ和初始速度v。
在本申请实施例中,梯度数据表示为:
在本申请实施例中,当一个训练数据被采样过后,它的Embedding的梯度不为0,基 于该采样的特征,通过判断梯度数据是否已更新,即可获知该训练数据是否被采样过。
在本申请实施例中,若梯度数据未更新,则说明该训练数据没有被采样过便进行后续的更新操作,没有被反复采样的训练数据,对应的Embedding层基于历史动量也会被被反复训练更新,导致了过拟合情况发生。
在本申请实施例中,更新速度表示为:
v
new=αv
old-∈g
其中,v
new表示更新速度;v
old表示初始速度参数;α表示动量参数;∈表示学习率;g表示梯度数据。
在本申请实施例中,更新决策参数表示为:
θ
new=θ
old+v
new
其中,θ
new表示更新决策参数;θ
old表示初始决策参数;v
new表示更新速度。
本申请实施例二提供的应用于动量梯度下降的模型优化装置,由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
继续参阅图5,示出了图4中函数定义模块103的结构示意图,为了便于说明,仅示出与本申请相关的部分。
在本申请实施例一的一些可选的实现方式中,上述函数定义模块103具体包括:矩阵生成子模块1031、矩阵分解子模块1032以及函数构造子模块1033。其中:
矩阵生成子模块1031,用于基于用户文本的数据集生成用户-文本矩阵;
矩阵分解子模块1032,用于基于奇异值分解法对用户-文本矩阵进行分解操作,得到用户-隐特征矩阵以及隐特征-文本矩阵;
函数构造子模块1033,用于基于用户-文本矩阵构造目标函数。
在本申请实施例中,奇异值分解(Singular Value Decomposition)是线性代数中一种重要的矩阵分解,奇异值分解则是特征分解在任意矩阵上的推广。
其中,R
(Λ)表示用户-文本矩阵R用户对文本的评分数据集合;p
m`表示用户-隐特征矩阵P中第m个用户对应的隐特征;q
n`表示隐特征-文本矩阵Q中第n个文本对应的隐特征;r
m,n表示用户m对文本n的评分数据;
表示评分数据集合中用户m对文本n的评分数据;λ
2表示隐特征矩阵的正则化因子。
在本申请实施例二的一些可选的实现方式中,梯度数据表示为:
在本申请实施例二的一些可选的实现方式中,更新速度表示为:
v
new=αv
old-∈g
其中,v
new表示更新速度;v
old表示初始速度参数;α表示动量参数;∈表示学习率;g表示梯度数据。
在本申请实施例二的一些可选的实现方式中,更新决策参数表示为:
θ
new=θ
old+v
new
其中,θ
new表示更新决策参数;θ
old表示初始决策参数;v
new表示更新速度。
在本申请实施例二的一些可实现方式中,上述目标模型获取模块110具体包括:差值计算子模块、收敛判断子模块、收敛确认子模块以及未收敛确认子模块。其中:
差值计算子模块,用于计算所述初始决策参数以及所述更新决策参数的决策参数差值;
收敛判断子模块,用于判断所述决策参数差值是否小于所述预设收敛阈值;
收敛确认子模块,用于若所述决策参数差值小于或等于所述预设收敛阈值,则确定当前的预测模型收敛,并将所述当前的预测模型作为所述目标预测模型;
未收敛确认子模块,用于若所述决策参数差值大于所述预设收敛阈值,则则确定当前的预测模型未收敛,继续执行参数优化操作。
综上,本申请实施例二提供的应用于动量梯度下降的模型优化装置,包括:请求接收模块,用于接收用户终端发送的模型优化请求,模型优化请求至少携带有原始预测模型以及原始训练数据集;采样操作模块,用于在原始训练数据集中进行采样操作,得到本轮训练数据集;函数定义模块,用于基于本轮训练数据集定义目标函数;初始化模块,用于初始化原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;梯度计算模块,用于计算本轮需要更新初始决策参数对应的梯度数据;梯度判断模块,用于判断梯度数据是否已更新;异常确认模块,用于若梯度数据未更新,则输出采样异常信号;速度参数更新模块,用于若梯度数据已更新,则基于梯度数据更新初始速度参数,得到更新速度;决策参数更新模块,用于基于更新速度更新初始决策参数,得到更新决策参数;目标模型获取模块,用于当初始决策参数以及更新决策参数满足收敛条件时,得到目标预测模型。由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图6,图6为本实施例计算机设备基本结构框图。
所述计算机设备200包括通过系统总线相互通信连接存储器210、处理器220、网络接口230。需要指出的是,图中仅示出了具有组件210-230的计算机设备200,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器210至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等,所述计算机可读存储介质可以是非易失性,也可以是易失性。在一些实施例中,所述存储器210可以是所述计算机设备200的内部存储单元,例如该计算机设备200的硬盘或内存。在另一些实施例中,所述存储器210也可以是所述计算机设备200的外部存储设备,例如该计算机设备200上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器210还可以既包括所述计算机设备200的内部存储单元也包括其外部存储设备。本实施例中,所述存储器210通常用于存储安装于所述计算机设备200的操作系统和各类应用软件,例如应用于动量梯度下降的模型优化方法 的计算机可读指令等。此外,所述存储器210还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器220在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器220通常用于控制所述计算机设备200的总体操作。本实施例中,所述处理器220用于运行所述存储器210中存储的计算机可读指令或者处理数据,例如运行所述应用于动量梯度下降的模型优化方法的计算机可读指令。
所述网络接口230可包括无线网络接口或有线网络接口,该网络接口230通常用于在所述计算机设备200与其他电子设备之间建立通信连接。
本申请提供的应用于动量梯度下降的模型优化方法,由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行如上述的应用于动量梯度下降的模型优化方法的步骤。
本申请提供的应用于动量梯度下降的模型优化方法,由于带动量的随机梯度下降在训练过程中,当前轮次的训练数据没有被采样到,而该轮次梯度更新仍然会使用历史动量来更新,这可能导致Embedding层过拟合,本申请在更新梯度之前,通过确认梯度数据是否已经更新,从而确认该轮次的训练数据确定被采样,才进行该梯度更新操作,从而有效避免在训练时当前batch中没被采样到的词,依然会使用历史动量来更新导致Embedding层过拟合的问题。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。
Claims (20)
- 一种应用于动量梯度下降的模型优化方法,其中,包括下述步骤:接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;在所述原始训练数据集中进行采样操作,得到本轮训练数据集;基于所述本轮训练数据集定义目标函数;初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;计算本轮需要更新所述初始决策参数对应的梯度数据;判断所述梯度数据是否已更新;若所述梯度数据未更新,则输出采样异常信号;若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;基于所述更新速度更新所述初始决策参数,得到更新决策参数;当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
- 根据权利要求1所述的应用于动量梯度下降的模型优化方法,其中,所述本轮训练数据集包括用户文本的数据集,所述基于所述本轮训练数据集定义目标函数的步骤,具体包括:基于所述用户文本的数据集生成用户-文本矩阵;基于奇异值分解法对所述用户-文本矩阵进行分解操作,得到用户-隐特征矩阵以及隐特征-文本矩阵;基于所述用户-文本矩阵构造目标函数,所述目标函数RSE R(Λ)表示为:
- 根据权利要求3所述的应用于动量梯度下降的模型优化方法,其中,所述更新速度表示为:v new=αv old-∈g其中,v new表示所述更新速度;v old表示所述初始速度参数;α表示动量参数;∈表示学习率;g表示所述梯度数据。
- 根据权利要求1所述的应用于动量梯度下降的模型优化方法,其中,所述更新决策参数表示为:θ new=θ old+v new其中,θ new表示更新决策参数;θ old表示初始决策参数;v new表示所述更新速度。
- 根据权利要求5所述的应用于动量梯度下降的模型优化方法,其中,所述收敛条件为预设收敛阈值;所述当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型的步骤,具体包括:计算所述初始决策参数以及所述更新决策参数的决策参数差值;判断所述决策参数差值是否小于所述预设收敛阈值;若所述决策参数差值小于或等于所述预设收敛阈值,则确定当前的预测模型收敛,并将所述当前的预测模型作为所述目标预测模型;若所述决策参数差值大于所述预设收敛阈值,则则确定当前的预测模型未收敛,继续执行参数优化操作。
- 一种应用于动量梯度下降的模型优化装置,其中,包括:请求接收模块,用于接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;采样操作模块,用于在所述原始训练数据集中进行采样操作,得到本轮训练数据集;函数定义模块,用于基于所述本轮训练数据集定义目标函数;初始化模块,用于初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;梯度计算模块,用于计算本轮需要更新所述初始决策参数对应的梯度数据;梯度判断模块,用于判断所述梯度数据是否已更新;异常确认模块,用于若所述梯度数据未更新,则输出采样异常信号;速度参数更新模块,用于若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;决策参数更新模块,用于基于所述更新速度更新所述初始决策参数,得到更新决策参数;目标模型获取模块,用于当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
- 根据权利要求7所述的应用于动量梯度下降的模型优化装置,其中,所述函数定义模块包括:矩阵生成子模块,用于基于所述用户文本的数据集生成用户-文本矩阵;矩阵分解子模块,用于基于奇异值分解法对所述用户-文本矩阵进行分解操作,得到用户-隐特征矩阵以及隐特征-文本矩阵;函数构造子模块,用于基于所述用户-文本矩阵构造目标函数,所述目标函数RSE R(Λ)表示为:
- 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的应用于动量梯度下降的模型优化方法的步骤:接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;在所述原始训练数据集中进行采样操作,得到本轮训练数据集;基于所述本轮训练数据集定义目标函数;初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;计算本轮需要更新所述初始决策参数对应的梯度数据;判断所述梯度数据是否已更新;若所述梯度数据未更新,则输出采样异常信号;若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;基于所述更新速度更新所述初始决策参数,得到更新决策参数;当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
- 根据权利要求9所述的计算机设备,其中,所述本轮训练数据集包括用户文本的数据集,所述基于所述本轮训练数据集定义目标函数的步骤,具体包括:基于所述用户文本的数据集生成用户-文本矩阵;基于奇异值分解法对所述用户-文本矩阵进行分解操作,得到用户-隐特征矩阵以及隐特征-文本矩阵;基于所述用户-文本矩阵构造目标函数,所述目标函数RSE R(Λ)表示为:
- 根据权利要求11所述的计算机设备,其中,所述更新速度表示为:v new=αv old-∈g其中,v new表示所述更新速度;v old表示所述初始速度参数;α表示动量参数;∈表示学习率;g表示所述梯度数据。
- 根据权利要求9所述的计算机设备,其中,所述更新决策参数表示为:θ new=θ old+v new其中,θ new表示更新决策参数;θ old表示初始决策参数;v new表示所述更新速度。
- 根据权利要求13所述的计算机设备,其中,所述收敛条件为预设收敛阈值;所述当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型的步骤,具体包括:计算所述初始决策参数以及所述更新决策参数的决策参数差值;判断所述决策参数差值是否小于所述预设收敛阈值;若所述决策参数差值小于或等于所述预设收敛阈值,则确定当前的预测模型收敛,并将所述当前的预测模型作为所述目标预测模型;若所述决策参数差值大于所述预设收敛阈值,则则确定当前的预测模型未收敛,继续执行参数优化操作。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的应用于动量梯度下降的模型优化方法的步骤:接收用户终端发送的模型优化请求,所述模型优化请求至少携带有原始预测模型以及原始训练数据集;在所述原始训练数据集中进行采样操作,得到本轮训练数据集;基于所述本轮训练数据集定义目标函数;初始化所述原始预测模型的模型优化参数,得到初始速度参数以及初始决策参数;计算本轮需要更新所述初始决策参数对应的梯度数据;判断所述梯度数据是否已更新;若所述梯度数据未更新,则输出采样异常信号;若所述梯度数据已更新,则基于所述梯度数据更新所述初始速度参数,得到更新速度;基于所述更新速度更新所述初始决策参数,得到更新决策参数;当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型。
- 根据权利要求15所述的计算机可读存储介质,其中,所述本轮训练数据集包括用户文本的数据集,所述基于所述本轮训练数据集定义目标函数的步骤,具体包括:基于所述用户文本的数据集生成用户-文本矩阵;基于奇异值分解法对所述用户-文本矩阵进行分解操作,得到用户-隐特征矩阵以及隐特征-文本矩阵;基于所述用户-文本矩阵构造目标函数,所述目标函数RSE R(Λ)表示为:
- 根据权利要求17所述的计算机可读存储介质,其中,所述更新速度表示为:v new=αv old-∈g其中,v new表示所述更新速度;v old表示所述初始速度参数;α表示动量参数;∈表示学习率;g表示所述梯度数据。
- 根据权利要求15所述的计算机可读存储介质,其中,所述更新决策参数表示为:θ new=θ old+v new其中,θ new表示更新决策参数;θ old表示初始决策参数;v new表示所述更新速度。
- 根据权利要求19所述的计算机可读存储介质,其中,所述收敛条件为预设收敛阈值;所述当所述初始决策参数以及所述更新决策参数满足收敛条件时,得到目标预测模型的步骤,具体包括:计算所述初始决策参数以及所述更新决策参数的决策参数差值;判断所述决策参数差值是否小于所述预设收敛阈值;若所述决策参数差值小于或等于所述预设收敛阈值,则确定当前的预测模型收敛,并将所述当前的预测模型作为所述目标预测模型;若所述决策参数差值大于所述预设收敛阈值,则则确定当前的预测模型未收敛,继续执行参数优化操作。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011359384.8 | 2020-11-27 | ||
| CN202011359384.8A CN112488183B (zh) | 2020-11-27 | 2020-11-27 | 一种模型优化方法、装置、计算机设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022110640A1 true WO2022110640A1 (zh) | 2022-06-02 |
Family
ID=74935992
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/090501 Ceased WO2022110640A1 (zh) | 2020-11-27 | 2021-04-28 | 一种模型优化方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112488183B (zh) |
| WO (1) | WO2022110640A1 (zh) |
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116068903A (zh) * | 2023-04-06 | 2023-05-05 | 中国人民解放军国防科技大学 | 一种闭环系统鲁棒性能的实时优化方法、装置及设备 |
| CN116291366A (zh) * | 2023-03-28 | 2023-06-23 | 联想(北京)有限公司 | 信息处理方法、装置及电子设备和存储介质 |
| CN116451872A (zh) * | 2023-06-08 | 2023-07-18 | 北京中电普华信息技术有限公司 | 碳排放预测分布式模型训练方法、相关方法及装置 |
| CN116484213A (zh) * | 2022-12-13 | 2023-07-25 | 山东省交通规划设计院集团有限公司 | 基于投影重构与深度学习的公路结构健康预测方法及系统 |
| CN117033352A (zh) * | 2023-07-03 | 2023-11-10 | 深圳大学 | 一种数据修复方法、装置、终端设备及存储介质 |
| CN117077598A (zh) * | 2023-10-13 | 2023-11-17 | 青岛展诚科技有限公司 | 一种基于Mini-batch梯度下降法的3D寄生参数的优化方法 |
| CN117350564A (zh) * | 2023-10-13 | 2024-01-05 | 内蒙古电力勘测设计院有限责任公司 | 一种输变电项目投资预测方法及装置 |
| CN117350360A (zh) * | 2023-09-21 | 2024-01-05 | 摩尔线程智能科技(北京)有限责任公司 | 大模型的微调方法、装置、电子设备和存储介质 |
| CN117596156A (zh) * | 2023-12-07 | 2024-02-23 | 机械工业仪器仪表综合技术经济研究所 | 一种工业应用5g网络的评估模型的构建方法 |
| CN117875367A (zh) * | 2023-12-19 | 2024-04-12 | 鹏城实验室 | 文本生成方法、装置、设备和存储介质 |
| CN118815778A (zh) * | 2024-09-19 | 2024-10-22 | 南通金芸流体设备有限公司 | 一种液压阀门开度控制方法及系统 |
| CN119416524A (zh) * | 2024-11-05 | 2025-02-11 | 河北工业大学 | 一种固体发动机装药性能不确定性设计优化方法及相关装置 |
| CN119478578A (zh) * | 2024-10-08 | 2025-02-18 | 哈尔滨工业大学 | 一种基于top2混合决策模型集成算法的图像识别方法及系统 |
| CN119539059A (zh) * | 2024-11-25 | 2025-02-28 | 中国民航信息网络股份有限公司 | 项目推荐方法、装置、计算机可读存储介质及电子设备 |
| CN119805553A (zh) * | 2023-10-10 | 2025-04-11 | 中国石油化工股份有限公司 | 克服周期跳跃的方法、装置、电子设备及存储介质 |
| CN120687377A (zh) * | 2025-08-25 | 2025-09-23 | 中国科学技术大学 | 一种基于梯度优化缓存的大模型内容生成加速方法和系统 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112488183B (zh) * | 2020-11-27 | 2024-05-10 | 平安科技(深圳)有限公司 | 一种模型优化方法、装置、计算机设备及存储介质 |
| CN116610690A (zh) * | 2023-06-01 | 2023-08-18 | 重庆农村商业银行股份有限公司 | 一种模型自动化更新方法、装置、设备及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170103161A1 (en) * | 2015-10-13 | 2017-04-13 | The Governing Council Of The University Of Toronto | Methods and systems for 3d structure estimation |
| CN110390561A (zh) * | 2019-07-04 | 2019-10-29 | 四川金赞科技有限公司 | 基于动量加速随机梯度下降的用户-金融产品选用倾向高速预测方法和装置 |
| CN110730037A (zh) * | 2019-10-21 | 2020-01-24 | 苏州大学 | 一种基于动量梯度下降法的相干光通信系统光信噪比监测方法 |
| CN111507530A (zh) * | 2020-04-17 | 2020-08-07 | 集美大学 | 基于分数阶动量梯度下降的rbf神经网络船舶交通流预测方法 |
| CN111695295A (zh) * | 2020-06-01 | 2020-09-22 | 中国人民解放军火箭军工程大学 | 一种光栅耦合器的入射参数反演模型的构建方法 |
| CN112488183A (zh) * | 2020-11-27 | 2021-03-12 | 平安科技(深圳)有限公司 | 一种模型优化方法、装置、计算机设备及存储介质 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110889509B (zh) * | 2019-11-11 | 2023-04-28 | 安徽超清科技股份有限公司 | 一种基于梯度动量加速的联合学习方法及装置 |
| CN111639710B (zh) * | 2020-05-29 | 2023-08-08 | 北京百度网讯科技有限公司 | 图像识别模型训练方法、装置、设备以及存储介质 |
-
2020
- 2020-11-27 CN CN202011359384.8A patent/CN112488183B/zh active Active
-
2021
- 2021-04-28 WO PCT/CN2021/090501 patent/WO2022110640A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170103161A1 (en) * | 2015-10-13 | 2017-04-13 | The Governing Council Of The University Of Toronto | Methods and systems for 3d structure estimation |
| CN110390561A (zh) * | 2019-07-04 | 2019-10-29 | 四川金赞科技有限公司 | 基于动量加速随机梯度下降的用户-金融产品选用倾向高速预测方法和装置 |
| CN110730037A (zh) * | 2019-10-21 | 2020-01-24 | 苏州大学 | 一种基于动量梯度下降法的相干光通信系统光信噪比监测方法 |
| CN111507530A (zh) * | 2020-04-17 | 2020-08-07 | 集美大学 | 基于分数阶动量梯度下降的rbf神经网络船舶交通流预测方法 |
| CN111695295A (zh) * | 2020-06-01 | 2020-09-22 | 中国人民解放军火箭军工程大学 | 一种光栅耦合器的入射参数反演模型的构建方法 |
| CN112488183A (zh) * | 2020-11-27 | 2021-03-12 | 平安科技(深圳)有限公司 | 一种模型优化方法、装置、计算机设备及存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| XIAO LIU CLASSMATE: "Machine Learning Optimization Methods: Momentum Momentum Gradient Descent", CSDN BLOG, 2 December 2019 (2019-12-02), pages 1 - 8, XP055933014, Retrieved from the Internet <URL:https://blog.csdn.net/SweetSeven_/article/details/103353990> [retrieved on 20220620] * |
Cited By (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116484213A (zh) * | 2022-12-13 | 2023-07-25 | 山东省交通规划设计院集团有限公司 | 基于投影重构与深度学习的公路结构健康预测方法及系统 |
| CN116291366A (zh) * | 2023-03-28 | 2023-06-23 | 联想(北京)有限公司 | 信息处理方法、装置及电子设备和存储介质 |
| CN116068903A (zh) * | 2023-04-06 | 2023-05-05 | 中国人民解放军国防科技大学 | 一种闭环系统鲁棒性能的实时优化方法、装置及设备 |
| CN116451872A (zh) * | 2023-06-08 | 2023-07-18 | 北京中电普华信息技术有限公司 | 碳排放预测分布式模型训练方法、相关方法及装置 |
| CN116451872B (zh) * | 2023-06-08 | 2023-09-01 | 北京中电普华信息技术有限公司 | 碳排放预测分布式模型训练方法、相关方法及装置 |
| CN117033352A (zh) * | 2023-07-03 | 2023-11-10 | 深圳大学 | 一种数据修复方法、装置、终端设备及存储介质 |
| CN117350360A (zh) * | 2023-09-21 | 2024-01-05 | 摩尔线程智能科技(北京)有限责任公司 | 大模型的微调方法、装置、电子设备和存储介质 |
| CN119805553A (zh) * | 2023-10-10 | 2025-04-11 | 中国石油化工股份有限公司 | 克服周期跳跃的方法、装置、电子设备及存储介质 |
| CN119805553B (zh) * | 2023-10-10 | 2025-11-28 | 中国石油化工股份有限公司 | 克服全波反演中周期跳跃的方法、装置、电子设备及存储介质 |
| CN117077598A (zh) * | 2023-10-13 | 2023-11-17 | 青岛展诚科技有限公司 | 一种基于Mini-batch梯度下降法的3D寄生参数的优化方法 |
| CN117350564A (zh) * | 2023-10-13 | 2024-01-05 | 内蒙古电力勘测设计院有限责任公司 | 一种输变电项目投资预测方法及装置 |
| CN117077598B (zh) * | 2023-10-13 | 2024-01-26 | 青岛展诚科技有限公司 | 一种基于Mini-batch梯度下降法的3D寄生参数的优化方法 |
| CN117596156A (zh) * | 2023-12-07 | 2024-02-23 | 机械工业仪器仪表综合技术经济研究所 | 一种工业应用5g网络的评估模型的构建方法 |
| CN117596156B (zh) * | 2023-12-07 | 2024-05-07 | 机械工业仪器仪表综合技术经济研究所 | 一种工业应用5g网络的评估模型的构建方法 |
| CN117875367A (zh) * | 2023-12-19 | 2024-04-12 | 鹏城实验室 | 文本生成方法、装置、设备和存储介质 |
| CN118815778A (zh) * | 2024-09-19 | 2024-10-22 | 南通金芸流体设备有限公司 | 一种液压阀门开度控制方法及系统 |
| CN119478578A (zh) * | 2024-10-08 | 2025-02-18 | 哈尔滨工业大学 | 一种基于top2混合决策模型集成算法的图像识别方法及系统 |
| CN119416524A (zh) * | 2024-11-05 | 2025-02-11 | 河北工业大学 | 一种固体发动机装药性能不确定性设计优化方法及相关装置 |
| CN119416524B (zh) * | 2024-11-05 | 2025-09-05 | 河北工业大学 | 一种固体发动机装药性能不确定性设计优化方法及相关装置 |
| CN119539059A (zh) * | 2024-11-25 | 2025-02-28 | 中国民航信息网络股份有限公司 | 项目推荐方法、装置、计算机可读存储介质及电子设备 |
| CN120687377A (zh) * | 2025-08-25 | 2025-09-23 | 中国科学技术大学 | 一种基于梯度优化缓存的大模型内容生成加速方法和系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112488183A (zh) | 2021-03-12 |
| CN112488183B (zh) | 2024-05-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022110640A1 (zh) | 一种模型优化方法、装置、计算机设备及存储介质 | |
| US11829880B2 (en) | Generating trained neural networks with increased robustness against adversarial attacks | |
| CN113424199B (zh) | 用于神经网络的复合模型缩放 | |
| WO2021155713A1 (zh) | 基于权重嫁接的模型融合的人脸识别方法及相关设备 | |
| CN110520871A (zh) | 训练机器学习模型 | |
| CN111831675A (zh) | 一种仓储模型训练方法、装置、计算机设备及存储介质 | |
| WO2019095570A1 (zh) | 预测事件流行度方法、服务器及计算机可读存储介质 | |
| CN115099875A (zh) | 基于决策树模型的数据分类方法及相关设备 | |
| CN113761262B (zh) | 图像的检索类别确定方法、系统以及图像检索方法 | |
| WO2020248365A1 (zh) | 智能分配模型训练内存方法、装置及计算机可读存储介质 | |
| CN111340221A (zh) | 神经网络结构的采样方法和装置 | |
| CN112214775A (zh) | 对图数据的注入式攻击方法、装置、介质及电子设备 | |
| CN111160000B (zh) | 作文自动评分方法、装置终端设备及存储介质 | |
| WO2022116439A1 (zh) | 一种基于联邦学习的ct图像检测方法及相关装置 | |
| WO2020191001A1 (en) | Real-world network link analysis and prediction using extended probailistic maxtrix factorization models with labeled nodes | |
| WO2022105121A1 (zh) | 一种应用于bert模型的蒸馏方法、装置、设备及存储介质 | |
| CN116684330A (zh) | 基于人工智能的流量预测方法、装置、设备及存储介质 | |
| CN113961720A (zh) | 预测实体关系的方法和关系预测模型的训练方法、装置 | |
| CN116305289A (zh) | 医疗隐私数据处理方法、装置、计算机设备及存储介质 | |
| CN113420161B (zh) | 一种节点文本融合方法、装置、计算机设备及存储介质 | |
| CN117313579B (zh) | 发动机压缩部件流场预测方法、装置、设备及存储介质 | |
| CN114241411A (zh) | 基于目标检测的计数模型处理方法、装置及计算机设备 | |
| CN115293889B (zh) | 信用风险预测模型训练方法、电子设备及可读存储介质 | |
| CN114758130B (zh) | 图像处理及模型训练方法、装置、设备和存储介质 | |
| CN115545753A (zh) | 一种基于贝叶斯算法的合作伙伴预测方法及相关设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21896155 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21896155 Country of ref document: EP Kind code of ref document: A1 |







