Invented by Longpo Liu, Wei Wan, Qian Chen, Tencent Technology Shenzhen Co Ltd
The Tencent Technology Shenzhen Co Ltd invention works as follows
This application is a method and apparatus for training machine learning models, as well as a method and apparatus for classifying expression images. The machine-learning model training method includes the following: obtaining a model that has a parameter, which is obtained by training with a general-purpose training set of images; determining an example of a special purpose image and its classification label; entering the sample into the machine-learning model to obtain an interim classification result; and then adjusting the parameter of the model of the machine-learning model in accordance with a difference between this intermediate classification and the classification label. The solutions in this application increase the efficiency of training the machine learning model.Background for Machine Learning Model Training method and Device, and Expression Image Classification method and Device
With the advancement of terminal storage and network technologies, it is becoming easier to interact using images. More users are choosing to do so, which leads to an increase in images used to perform interactions. The classification of images is crucial for personalized recommendations and the creation of user profiles. A trained machine learning algorithm can be used to classify pictures. “A conventional machine-learning model training method is to train a machine-learning model using large amounts of training data and make the model learn a classifier rule in order to improve the accuracy of the model.
However, due to the traditional model training method, which requires a large amount of training data, it takes a long time to obtain the data, and then to use the data to train the machine learning model. This results in a relatively low training efficiency for the machine-learning model.
This application proposes a method and apparatus for training machine learning models, as well as a method and apparatus for classifying expression images, in order to solve the problem of low training efficiency with the conventional machine-learning model.
A machine-learning model training method for a computer is used, and the method includes:
obtaining a machine-learning model by training with a general purpose image training set in which the model parameter(s) of the machine learning is one or more;
determining a set of sample images for special purposes and a classification label corresponding to them;
Inputting the sample set special-purpose images into the machine learning model to obtain an interim classification result for the classification label
adjusting the parameters of the machine-learning model in accordance with a difference between an intermediate classification result and a classification label
repeating inputting and adjusting until a training-stop condition is met to obtain the machine-learning model with adjusted model parameters.
The machine learning model is trained by a computer device that includes one or multiple processors. It also contains a memory connected to the processors. In the memory, there are a number of programs which, when executed on the processors cause the computing device perform the machine learning method.
The non-transitory storage medium contains at least a single instruction, at most one program and at least a code or instruction set. These are then loaded by the processor and executed to implement the machine learning model training.
The machine learning training apparatus and method described above include a machine-learning model with a model parameter that was obtained by training using a general-purpose training image set. A sample of a specific-purpose image, along with a classification label, is then used to train the model. The knowledge acquired from the general-purpose training set is transferred to a training process using the sample of the specific-purpose images. By adjusting the model parameters, it is possible to quickly train a machine-learning model with a relatively high classification accuracy.
The machine learning model selects the label that corresponds to the highest probability to be the classification result. This improves the classification efficiency and accuracy.