Data processing method, device and storage medium
By determining the auxiliary loss value based on structural parameters during neural network training and optimizing network parameters and structural parameters, the problem of discrete deviation of neural network output results is solved, and the accuracy of the model and the accuracy of classification results are improved.
Patent Information
- Application Number
- CN202010538271.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-06-12
AI Technical Summary
There is a discretization deviation in the output results of neural network-based data processing, resulting in low model accuracy.
By determining the auxiliary loss value based on the structural parameters of the predetermined model during the training process, and combining the verification loss value to determine whether to stop training, optimizing the network parameters and structural parameters, so that the output value approaches the derivative direction of the auxiliary loss value, thus Reduce discretization deviation.
Improve the accuracy of the model and obtain more accurate classification results.
Smart Images

Figure CN111753895B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of neural network technology, and in particular to a data processing method, device and storage medium. Background Art
[0002] Neural network is an algorithmic mathematical model that imitates the behavioral characteristics of animal neural networks and performs distributed parallel information processing. It mainly relies on the complexity of the system and adjusts the interconnected relationships between a large number of internal nodes to achieve the purpose of processing information. Neural network data processing has a wide range of applications in fields such as data classification, speech analysis, and image recognition. However, the results based on the output of the neural network currently have discretization deviations, which will lead to low accuracy of the trained model. Summary of the invention
[0003] The present disclosure provides a data processing method, device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including:
[0005] Inputting each labeled training data in the training set into a predetermined model to be trained, and updating model parameters of the predetermined model, wherein the model parameters include: structural parameters;
[0006] Inputting each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label;
[0007] Obtaining a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data;
[0008] Determining the auxiliary loss value according to the current structural parameters of the predetermined model;
[0009] Determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value;
[0010] After stopping the training of the predetermined model, the target network model constructed based on the network structure included in the trained predetermined model classifies the data to be classified to obtain a classification result.
[0011] Optionally, the method further includes:
[0012] Using an activation function to normalize the current structural parameters of the predetermined model after the model parameters are updated, to obtain the normalized current structural parameters;
[0013] The determining of the auxiliary loss value according to the current structural parameters of the predetermined model includes:
[0014] The auxiliary loss value is determined according to the normalized current structural parameters.
[0015] Optionally, determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value includes:
[0016] Determine a weighted sum of the verification loss value and the auxiliary loss value according to the verification loss value, the auxiliary loss value and the weight coefficient to obtain a total loss value of the predetermined model;
[0017] When the numerical change of the total loss value within a set time period is less than a set change threshold, the training of the predetermined model is stopped.
[0018] Optionally, after stopping the training of the predetermined model, classifying the data to be classified based on the target network model constructed based on the network structure included in the trained predetermined model to obtain a classification result includes:
[0019] After stopping the training of the predetermined model, normalizing each structural parameter in the trained predetermined model based on the activation function to obtain normalized structural parameters;
[0020] Determining, from the trained predetermined model, a network structure whose normalized structural parameter is greater than a set parameter threshold;
[0021] Based on the network structure whose normalized structural parameter value is greater than the set parameter threshold, a target network model is constructed;
[0022] The data to be classified is classified based on the target network model to obtain the classification result.
[0023] Optionally, the target network model constructed based on the network structure included in the trained predetermined model classifies the data to be classified to obtain a classification result, including:
[0024] Input the data to be classified into the target network model, and output M category probabilities of the data to be classified in M categories; wherein the category labels corresponding to the first preset number of category probabilities among the M category probabilities are the classification results of the data to be classified;
[0025] Wherein, the type of the data to be classified includes at least one of the following: image data type, text data type and audio data type. Optionally, the model parameters also include: network parameters; the inputting of each labeled training data in the training set into the predetermined model to be trained, and updating the model parameters of the predetermined model, includes:
[0026] Input each of the labeled training data in the training set into the predetermined model to be trained to obtain a second prediction label;
[0027] Obtaining a training loss value according to a difference between the second predicted label and the labeled label of the labeled training data;
[0028] Based on the training loss value, updating the network parameters of the predetermined model;
[0029] Each of the labeled verification data in the verification set is input into the predetermined model after the network parameters are updated to update the structural parameters.
[0030] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
[0031] A first updating module is configured to input each labeled training data in the training set into a predetermined model to be trained, and update the model parameters of the predetermined model, wherein the model parameters include: structural parameters;
[0032] A first acquisition module is configured to input each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label;
[0033] A second acquisition module is configured to obtain a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data;
[0034] A first determination module is configured to determine an auxiliary loss value according to current structural parameters of the predetermined model;
[0035] A second determination module is configured to determine whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value;
[0036] The classification module is configured to classify the data to be classified based on the target network model constructed based on the network structure included in the trained predetermined model after stopping the training of the predetermined model to obtain a classification result.
[0037] Optionally, the device further comprises:
[0038] A first processing module is configured to use an activation function to normalize the current structural parameters of the predetermined model after the model parameters are updated to obtain the normalized current structural parameters;
[0039] The first determination module is further configured as:
[0040] The auxiliary loss value is determined according to the normalized current structural parameters.
[0041] Optionally, the second determining module is further configured to:
[0042] Determine a weighted sum of the verification loss value and the auxiliary loss value according to the verification loss value, the auxiliary loss value and the weight coefficient to obtain a total loss value of the predetermined model;
[0043] When the numerical change of the total loss value within a set time period is less than a set change threshold, the training of the predetermined model is stopped.
[0044] Optionally, the device further comprises:
[0045] A second processing module is configured to normalize each structural parameter in the trained predetermined model based on an activation function after stopping training the predetermined model to obtain a normalized structural parameter;
[0046] A third determination module is configured to determine, from the trained predetermined model, a network structure whose normalized structural parameter is greater than a set parameter threshold;
[0047] A construction module, configured to construct a target network model based on the network structure whose normalized structural parameter value is greater than the set parameter threshold;
[0048] The classification module is further configured to classify the data to be classified based on the target network model to obtain the classification result.
[0049] Optionally, the classification module is further configured to:
[0050] Input the data to be classified into the target network model, and output M category probabilities of the data to be classified in M categories; wherein the category labels corresponding to the first preset number of category probabilities among the M category probabilities are the classification results of the data to be classified;
[0051] The type of the data to be classified includes at least one of the following: an image data type, a text data type, and an audio data type.
[0052] Optionally, the model parameters further include: network parameters; the first updating module is further configured to:
[0053] Input each of the labeled training data in the training set into the predetermined model to be trained to obtain a second prediction label;
[0054] Obtaining a training loss value according to a difference between the second predicted label and the labeled label of the labeled training data;
[0055] Based on the training loss value, updating the network parameters of the predetermined model;
[0056] Each of the labeled verification data in the verification set is input into the predetermined model after the network parameters are updated to update the structural parameters.
[0057] According to a third aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
[0058] processor;
[0059] a memory configured to store processor-executable instructions;
[0060] Wherein, the processor is configured to: implement the steps in any of the above-mentioned data processing methods when executed.
[0061] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a data processing device, the device is enabled to perform any of the above-mentioned data processing methods.
[0062] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0063] It can be seen from the above embodiments that the present invention can determine the auxiliary loss value according to the current structural parameters of the predetermined model, and jointly determine whether to stop training the predetermined model based on the verification loss value and the auxiliary loss value. After increasing the auxiliary loss value, in the process of optimizing the predetermined model, in addition to optimizing the network parameters and structural parameters, the value of the output result can also be moved in the direction of the derivative of the auxiliary loss value, so that each output result can approach the set parameter value, for example, 0 or 1, thereby reducing the discretization deviation of the output result. In this way, the model accuracy of the trained model is higher, and the classification result obtained based on the model is more accurate.
[0064] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0066] Figure 1 It is a flowchart of a data processing method according to an exemplary embodiment.
[0067] Figure 2 It is a schematic diagram of a first auxiliary loss function and a second auxiliary loss function and directions of their derivatives according to an exemplary embodiment.
[0068] Figure 3 The diagram is a schematic diagram of a structure of a hypernetwork according to an exemplary embodiment.
[0069] Figure 4It is a schematic diagram showing the structure of another hypernetwork according to an exemplary embodiment.
[0070] Figure 5 It is a flowchart diagram of another data processing method according to an exemplary embodiment.
[0071] Figure 6 is a schematic diagram of a fair differentiable neural network search process with an auxiliary loss function according to an exemplary embodiment.
[0072] Figure 7 It is a block diagram of a data processing device according to an exemplary embodiment.
[0073] Figure 8 It is a block diagram of a data processing device according to an exemplary embodiment.
[0074] Fig. 9 is a block diagram of another data processing device according to an exemplary embodiment. DETAILED DESCRIPTION
[0075] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0076] The present disclosure provides a data processing method. Figure 1 is a flowchart of a data processing method according to an exemplary embodiment. Figure 1 As shown, the method mainly includes the following steps:
[0077] In step 101, each labeled training data in the training set is input into a predetermined model to be trained, and the model parameters of the predetermined model are updated, wherein the model parameters include: structural parameters;
[0078] In step 102, each labeled verification data in the verification set is input into the predetermined model after the model parameters are updated to obtain a first prediction label;
[0079] In step 103, a verification loss value is obtained according to a difference between the first predicted label and the labeled label of the labeled verification data;
[0080] In step 104, the auxiliary loss value is determined according to the current structural parameters of the predetermined model;
[0081] In step 105, determining whether to stop training the predetermined model is performed according to the verification loss value and the auxiliary loss value;
[0082] In step 106, after stopping the training of the predetermined model, the target network model constructed based on the network structure included in the trained predetermined model is used to classify the data to be classified to obtain a classification result.
[0083] The data processing method involved in the embodiments of the present disclosure can be applied to electronic devices, where the electronic devices include mobile terminals and fixed terminals, where the mobile terminals include: mobile phones, tablet computers, laptop computers, etc.; the fixed terminals include: personal computers. In other optional embodiments, the data processing method can also be run on network-side devices, where the network-side devices include: servers, processing centers, etc.
[0084] The predetermined model trained in the embodiment of the present disclosure can realize a predetermined function, which includes but is not limited to at least one of the following:
[0085] Object segmentation to segment the object and background in the input image;
[0086] Classification of objects in the input image;
[0087] Object tracking based on incoming images;
[0088] Diagnostic assistance based on medical images;
[0089] Functions such as speech recognition and speech correction based on input speech.
[0090] The above is only an example of the predetermined function implemented by the predetermined model, and the specific implementation is not limited to the above example.
[0091] In the process of training the predetermined model, it is first necessary to input each labeled training data in the training set into the predetermined model to be trained, and update the structural parameters and / or network parameters of the predetermined model. Among them, the structural parameters include parameters used to characterize the structural characteristics of each network structure in the predetermined model, and the structural characteristics include: the connection relationship of each network structure and other characteristics. Taking the predetermined network as a super network as an example, since the super network can contain multiple network structures, the connection relationship between each network structure can be characterized based on the structural parameters. The network parameters include weight parameters for training each network structure in the predetermined model. For example, if the predetermined model contains a network structure that can constitute a convolutional neural network, each network structure can be regarded as a filter (convolution kernel) constituting a convolutional neural network. At this time, the network parameter can be the weight of a filter.
[0092] In the embodiment of the present disclosure, each labeled training data in the training set can be input into a predetermined model to be trained, and the model parameters of the predetermined model can be updated based on the output results. The data type of the labeled training data can include: image data type, text data type or audio data type.
[0093] After updating the model parameters of the predetermined model, each labeled verification data in the verification set can be input into the predetermined model after the model parameters are updated to obtain a first prediction label; and then the preset loss function is used to obtain the verification loss value of the predetermined model on the verification set after the model parameters are updated based on the difference between the first prediction label and the labeled label of the labeled verification data. Here, the preset loss function is an algorithm for measuring the quality of the prediction results output by the predetermined model. Among them, the data type of the verification data may include: image data type, text data type or audio data type. In the implementation process, the first label vector value of the first prediction label and the labeled label vector value of the labeled label can be obtained first, and the first label vector value and the labeled label vector value can be input into the preset loss function, and the preset loss function is used to calculate the difference between the first label vector value and the labeled label vector value to obtain the verification loss value.
[0094] In the disclosed embodiment, based on the pre-built preset loss function, for example, the gradient descent method can be used to reversely adjust the model parameters of the predetermined model so that the model converges, that is, the final model is better. Among them, the selection of the loss function also affects the quality of the model to a certain extent. Among them, the preset loss function may include: binary mutual entropy loss and cross entropy loss function.
[0095] In the disclosed embodiment, the current structural parameters of the predetermined model after the model parameters are updated can also be obtained, the auxiliary loss value is determined based on the current structural parameters, and whether to stop training the predetermined model is determined based on the verification loss value and the auxiliary loss value. In other optional embodiments, the accuracy of the trained predetermined model can also be verified based on a set verification set, and when the accuracy reaches the set accuracy, the training of the predetermined model is stopped.
[0096] In the disclosed embodiment, the auxiliary loss value can be determined according to the current structural parameters of the predetermined model, and whether to stop training the predetermined model can be determined based on the verification loss value and the auxiliary loss value.
[0097] Here, the auxiliary loss function can be used to determine the auxiliary loss value. Since the output result of the auxiliary loss function is positively correlated with the pre-set weight coefficient, when the current structural parameters are determined, the auxiliary loss value can be adjusted by adjusting the size of the weight coefficient. That is, the larger the weight coefficient, the larger the auxiliary loss value; the smaller the weight coefficient, the smaller the auxiliary loss value.
[0098] Since the auxiliary loss value in the embodiment of the present disclosure is associated with the current structural parameters and weight coefficients, during the training of the predetermined model, the current structural parameters will change with the training process. When the current structural parameters change, if the result output by the predetermined model is biased, the auxiliary loss value can be adjusted by the weight coefficient, and the result output by the predetermined model can be adjusted based on the adjusted auxiliary loss value, thereby reducing the discretization deviation of the output result. In the embodiment of the present disclosure, after increasing the auxiliary loss value, in the process of optimizing the predetermined model, in addition to optimizing the network parameters and structural parameters, the value of the output result can also be moved in the direction of the derivative of the auxiliary loss value, so that each output result can approach the set parameter value, for example, 0 or 1, thereby reducing the discretization deviation of the output result. In this way, the model accuracy of the trained model is higher, and the classification result obtained by classifying the target network model constructed based on the network structure included in the trained predetermined model is more accurate.
[0099] In other optional embodiments, the method further includes:
[0100] Using an activation function to normalize the current structural parameters of the predetermined model after the model parameters are updated, to obtain the normalized current structural parameters;
[0101] The determining of the auxiliary loss value according to the current structural parameters of the predetermined model includes:
[0102] The auxiliary loss value is determined according to the normalized current structural parameters.
[0103] Here, the structural parameters may include the node weights of each network structure contained in the predetermined model, the number of layers of the network structure contained in the predetermined model, etc. When the network structure contained in the predetermined model is a structure that can constitute a convolutional neural network, the structural parameters may also be the size of each filter (convolution kernel). In the embodiment of the present disclosure, the activation function includes a softmax function and a sigmoid function, etc. In the embodiment of the present disclosure, the current structural parameters of the predetermined model after the model parameters are updated can be normalized based on the activation function to obtain the normalized current structural parameters. Taking the activation function as a softmax function as an example, the formula for normalizing the current structural parameters includes:
[0104]
[0105] In formula (1), ∑ i softmax(α i )=1; among them, softmax(α i ) represents the normalized current structural parameters; α iRepresents the current structural parameters, where i, j and M are all positive integers.
[0106] Taking the activation function as the Sigmoid function as an example, the formula for normalizing the current structural parameters includes:
[0107] σ(α i )=1 / (1+exp(-α i )) (2);
[0108] In formula (2), σ(α i ) represents the normalized current structural parameters; α i Represents the current structural parameters, where i is a positive integer.
[0109] Taking the updated model parameters as network parameters as an example, the current structural parameters of the predetermined model after the network parameters are updated can be obtained, the current structural parameters can be normalized to obtain the normalized current structural parameters, and then the auxiliary loss value can be determined based on the normalized current structural parameters.
[0110] In the disclosed embodiment, after the current structural parameters are determined, the auxiliary loss value is determined based on the current structural parameters. By associating the current structural parameters with the auxiliary loss value, when the structural parameters need to be updated based on the auxiliary loss value in the future, the value of the structural parameter to be updated can be moved in the inverse direction of the auxiliary loss value, thereby making the updated structural parameter approach the set structural parameter value, so as to improve the accuracy of model training.
[0111] In other optional embodiments, determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value includes:
[0112] According to the verification loss value, the auxiliary loss value and the weight coefficient, determining a weighted sum of the verification loss value and the auxiliary loss value to obtain a total loss value of the predetermined model;
[0113] When the numerical change of the total loss value within a set time period is less than a set change threshold, the training of the predetermined model is stopped.
[0114] Here, determining the weighted sum of the verification loss value and the auxiliary loss value according to the verification loss value, the auxiliary loss value and the weight coefficient to obtain the total loss value of the predetermined model includes: determining the product value of the auxiliary loss and the weight coefficient; adding the product value to the verification loss value to obtain the total loss value. In other optional embodiments, the weight coefficient can be obtained by experimenting using a grid search algorithm.
[0115] The calculation formula of the total loss value includes:
[0116] L total =L val (w * (α),α)+w 0-1 L 0-1 (3);
[0117] In formula (1), L total Indicates the total loss value; L val (w * (α),α) represents the validation loss value; w 0-1 Represents the weight coefficient; L 0-1 Represents the auxiliary loss value.
[0118] The formula for calculating the auxiliary loss value based on the first auxiliary loss function includes:
[0119]
[0120] In formula (4), L 0-1 represents the auxiliary loss value, σ(α i ) represents the normalized current structural parameters; α i Represents the current structural parameters, i and N are both positive integers.
[0121] In other optional embodiments, the formula for calculating the auxiliary loss value based on the second auxiliary loss function also includes:
[0122]
[0123] In formula (5), L' 0-1 represents the auxiliary loss value, σ(α i ) represents the normalized current structural parameters; α i Represents the current structural parameters, i and N are both positive integers. Figure 2 As shown, Figure 2 It is a schematic diagram of the first auxiliary loss function and the second auxiliary loss function and their derivative directions according to an exemplary embodiment, wherein the X-axis represents the current structural parameters and the Y-axis represents the derivative values of the first auxiliary loss function and the second auxiliary loss function.
[0124] In the disclosed embodiment, the auxiliary loss value can be determined according to the current structural parameters of the predetermined model, and the total loss value can be determined based on the verification loss value, the auxiliary loss value and the weight coefficient, and based on the total loss value, it can be judged whether to stop training the predetermined model. After increasing the auxiliary loss value, in the process of optimizing the predetermined model, the value of the output result can be moved in the direction of the derivative of the auxiliary loss value, so that each output result can approach the set parameter value, thereby reducing the discretization deviation of the output result.
[0125] In other optional embodiments, after stopping training the predetermined model, classifying the data to be classified based on the target network model constructed based on the network structure included in the trained predetermined model to obtain a classification result includes:
[0126] After stopping the training of the predetermined model, normalizing each structural parameter in the trained predetermined model based on the activation function to obtain normalized structural parameters;
[0127] Determining, from the trained predetermined model, a network structure whose normalized structural parameter is greater than a set parameter threshold;
[0128] Based on the network structure whose normalized structural parameter value is greater than the set parameter threshold, a target network model is constructed;
[0129] The data to be classified is classified based on the target network model to obtain the classification result.
[0130] Here, the activation function includes a softmax function and a Sigmoid function, etc. Taking the normalization of each structural parameter in the trained predetermined model based on the Sigmoid function as an example, in the process of normalizing the structural parameters using the Sigmoid function, the structural parameters are independent of each other, so that the normalized structural parameters corresponding to each structural parameter can be obtained respectively; then, it is determined whether the normalized structural parameter is greater than the set parameter threshold; when the normalized structural parameter is greater than the set parameter threshold, the network structure corresponding to the normalized structural parameter is determined as the structure constituting the target network model.
[0131] In other optional embodiments, the method further includes: performing a performance evaluation on the trained predetermined model based on a test data set to obtain an evaluation result; wherein the type of test data in the test data set includes at least one of the following: an image data type, a business data type, and an audio data type.
[0132] Here, after the trained predetermined model is formed, its performance can be evaluated on the test data set, and the network structure can be gradually optimized until the optimal predetermined model is found, such as a predetermined model that minimizes the verification loss or maximizes the reward. Here, the test data in the test data set can be input into the trained predetermined model, and the evaluation result can be output through the predetermined model, and then the output evaluation result can be compared with the preset standard to obtain a comparison result, and the performance of the predetermined model can be evaluated based on the comparison result, wherein the test result can be the speed or accuracy of the predetermined model processing the test data.
[0133] Since the predetermined model after training has multiple network layers, and the network structure whose normalized structural parameter is greater than the set parameter threshold in each network layer can be one or more. When there is one network structure whose normalized structural parameter is greater than the set parameter threshold in the network layer, the one network structure can be directly connected to the output end of the previous layer of the network layer and the input end of the next layer. When there are multiple network structures whose normalized structural parameters are greater than the set parameter threshold in the network layer, the functions characterizing each network structure can be added to obtain a new network structure for the network layer, and the new network structure can be connected to the output end of the previous layer of the network layer and the input end of the next layer. In the embodiment of the present disclosure, after the network structures of each network layer are connected, the target network model is formed. In the embodiment of the present disclosure, after the target network model is formed, the data to be classified can be classified based on the target network model to obtain a classification result.
[0134] In other optional embodiments, the target network model constructed based on the network structure included in the trained predetermined model classifies the data to be classified to obtain the classification result, including: inputting the data to be classified into the target network model, and outputting M category probabilities of the data to be classified in M categories; wherein the category labels corresponding to the first preset number of category probabilities in the M category probabilities are the classification results of the data to be classified; wherein the type of the data to be classified includes at least one of the following: image data type, text data type and audio data type. In other optional embodiments, the model parameters also include: network parameters; the inputting each labeled training data in the training set into the predetermined model to be trained, and updating the model parameters of the predetermined model, includes:
[0135] Input each of the labeled training data in the training set into the predetermined model to be trained to obtain a second prediction label;
[0136] Obtaining a training loss value according to a difference between the second predicted label and the labeled label of the labeled training data;
[0137] Based on the training loss value, updating the network parameters of the predetermined model;
[0138] Each of the labeled verification data in the verification set is input into the predetermined model after the network parameters are updated to update the structural parameters.
[0139] Here, each labeled training data in the training set can be input into the predetermined model after the model parameters are updated to obtain a second prediction label; and then the preset loss function is used to obtain the training loss value of the predetermined model on the training set based on the difference between the second prediction label and the labeled label of the labeled training data. Here, the preset loss function is an algorithm used to measure the quality of the prediction results output by the predetermined model. In the embodiment of the present disclosure, the model parameters of the predetermined model can be reversely adjusted based on the pre-constructed preset loss function, such as using the gradient descent method, so that the model converges, that is, the final model is better. Among them, the selection of the loss function also affects the quality of the model to a certain extent. The preset loss function can include: binary mutual entropy loss and cross entropy loss function.
[0140] After determining the training loss value, the network parameters of the predetermined model can be adjusted based on the training loss value using the gradient descent method. After updating the network parameters of the predetermined model, each labeled verification data in the verification set can be input into the predetermined model after the network parameters are updated to update the structural parameters.
[0141] In other optional embodiments, each labeled verification data in the verification set is input into the predetermined model after the network parameters are updated, and the structural parameters are updated, including: inputting each labeled verification data in the verification set into the predetermined model after the network parameters are updated to obtain a third prediction label; obtaining an updated loss value based on the difference between the third prediction label and the labeled label of the labeled verification data; determining an auxiliary loss value based on the current structural parameters of the predetermined model; and updating the structural parameters in the predetermined model after the network parameters are updated based on the updated loss value and the auxiliary loss value.
[0142] In the disclosed embodiment, the auxiliary loss value can be determined according to the current structural parameters of the predetermined model, and based on the updated loss value and the auxiliary loss value, the structural parameters in the predetermined model after the network parameters are updated are updated. After the auxiliary loss value is increased, in the process of optimizing the predetermined model, in addition to optimizing the network parameters, the values of the structural parameters can also be moved in the direction of the derivative of the auxiliary loss value, so that each structural parameter can approach the set parameter value, for example, 0 or 1, thereby reducing the discretization deviation of the structural parameter, so that the network structure after discretization and before discretization have similar expression capabilities.
[0143] In other optional embodiments, the method further includes: initializing the model parameters of the predetermined model to be trained to obtain the initialization parameters. Initializing the model parameters of the predetermined model to be trained to obtain the initialization parameters includes: detecting an initialization input; and initializing the model parameters of the predetermined model to be trained to obtain the initialization parameters according to the initialization input.
[0144] Here, taking the method involved in the embodiment of the present disclosure as an example, which is executed on a terminal device, the initial input can be detected based on the terminal device. When the initialization input is detected, the model parameters of the predetermined model to be trained can be initialized based on the initialization input to obtain the corresponding initialization parameters, that is, the model parameters of the predetermined model to be trained can be assigned default values. In this way, before the predetermined model is trained, the normal operation of the predetermined model to be trained can be guaranteed.
[0145] The technical solutions in any of the above embodiments of the present disclosure can be applied to Neural Architecture Search (NAS), where NAS is a technology for automatically designing neural networks. Based on NAS, a high-performance neural network structure can be automatically designed based on a sample set, which can effectively reduce the use and implementation costs of neural networks. In the process of searching based on NAS, a super network containing multiple network structures can be trained to generate a super network containing a search space of all network structures, that is, a set of candidate neural network structures, where the network structure is part of the neural network.
[0146] In Differentiable Architecture Search (DARTS), a method of training a super network that contains a search space of all network structures is adopted. The super network is composed of multiple searchable cells stacked in a certain order, and the cells include normal cells and reduction cells. Each cell is a directed acyclic graph (DAG). Each cell has N nodes, and there are M optional network structures between any two nodes. Each network structure contains two types of parameters: structural parameters α and network parameters w. The M structural parameters are constrained by the softmax function and affect each other. Here, the super network can be trained in a cross-training manner, that is, the structural parameters and network parameters are cross-updated. After the super network training converges, the network structure with the largest output value of the softmax function can be selected as the network structure that constitutes the target network model.
[0147] Figure 3 is a schematic diagram of a structure of a super network according to an exemplary embodiment. Figure 3As shown, the super network 300 includes a first network layer 301, a second network layer 302, a third network layer 303, ... wherein any two nodes in the first network layer 301, the second network layer 302 and the third network layer 303, ... respectively include M parallel network structures, namely network structure 1, network structure 2, ... network structure M, and the M structural parameters corresponding to the M parallel network structures are α1, α2, ... α M , and the M structural parameters are constrained by the softmax function.
[0148] In other optional embodiments, the network structure can also be searched based on the fair differentiable architecture search (Fair Differentiable Architecture Search, Fair DARTS). In the process of network search based on Fair DARTS, the sigmoid function can be used to replace the softmax function, and the M structural parameters are normalized respectively, so that the structural parameters are independent of each other. After the super network training converges, the network structure whose output value of the sigmoid function is greater than the set parameter threshold can be selected as the network structure constituting the target network model.
[0149] Figure 4 is a schematic diagram of another structure of a hypernetwork according to an exemplary embodiment. Figure 4 As shown, the super network 400 includes a first network layer 401, a second network layer 402, a third network layer 403, ... wherein any two nodes in the first network layer 401, the second network layer 402 and the third network layer 403, ... respectively include M parallel network structures, namely network structure 1, network structure 2, ... network structure M, and the M structural parameters corresponding to the M parallel network structures are α1, α2, ... α M , and each structural parameter is constrained by the sigmoid function.
[0150] Since the above two methods of determining the network structure of the target network model based on the structural parameters are both discretization operations, for example, if the value of the result output based on the softmax function or the sigmoid function is 0.8, it can be determined that the value is approximately 1, and there is a discretization deviation. In the embodiment of the present disclosure, the auxiliary loss value can be determined according to the current structural parameters of the predetermined model, and the structural parameters in the predetermined model after the network parameters are updated are updated based on the updated loss value and the auxiliary loss value. After increasing the auxiliary loss value, in the process of optimizing the predetermined model, in addition to optimizing the network parameters, the values of the structural parameters can also be moved in the direction of the derivative of the auxiliary loss value, so that each structural parameter can approach the set parameter value, for example, 0 or 1, thereby reducing the discretization deviation of the structural parameters, so that the network structure after discretization and before discretization has similar expression capabilities.
[0151] The predetermined model in the disclosed embodiment is not limited to the deep learning model in tasks such as image classification, target detection, semantic segmentation, text-to-speech, natural language translation, speech enhancement, speech recognition, etc. In the process of model training, the discretization deviation can be reduced in the fair differentiable neural network search, thereby obtaining a better neural network structure.
[0152] Figure 5 is a flowchart of another data processing method according to an exemplary embodiment. Figure 5 As shown, the method mainly includes the following steps:
[0153] In step 501, the network parameters and structural parameters of the super network (predetermined model to be trained) in fair differentiable search are initialized.
[0154] In step 502, the labeled training data in the training set is obtained, and the training data is input into the hypernetwork, a second predicted label is obtained through the hypernetwork operation, the second predicted label is compared with the actual labeled label of the training data, and the training loss value is calculated.
[0155] In step 503, the network parameters are updated using the gradient descent method according to the training loss value.
[0156] In step 504, the labeled verification data in the verification set is obtained, and the verification data is input into the hypernetwork after the network parameters are updated. The first predicted label is obtained by the hypernetwork operation after the network parameters are updated. The first predicted label is compared with the actual labeled label of the verification data to calculate the verification loss value.
[0157] In step 505, the current structural parameters of the super network after the network parameters are updated are obtained, and the auxiliary loss value is calculated based on the current structural parameters.
[0158] In step 506, the structural parameters are updated using the gradient descent method according to the verification loss value and the auxiliary loss value until the training of the hypernetwork is stopped.
[0159] In other optional embodiments, after stopping the training of the hypernetwork, each structural parameter in the trained hypernetwork is normalized based on the activation function to obtain the normalized structural parameters, and the network structure whose normalized structural parameters are greater than the set parameter threshold is selected as the network structure constituting the target network model. Taking the activation function as the Sigmoid function as an example, the network structure whose sigmoid function output value of the structural parameter in the trained hypernetwork is greater than the set parameter threshold can be selected as the network structure in the target network model. In other optional embodiments, after the target network model is constructed, the target network model can be retrained, and the trained target network model can be deployed in actual deep learning tasks.
[0160] Figure 6 is a schematic diagram of a fair differentiable neural network search process with an auxiliary loss function according to an exemplary embodiment, such as Figure 6 As shown, taking the image classification task as an example, given training data 601 and verification data 602 (both are images), and the corresponding real annotation label 603 (image category).
[0161] In the implementation process, the training data can be input into the hypernetwork, and the second prediction label is obtained through the hypernetwork operation. The second prediction label is compared with the real label label of the training data to calculate the training loss value; according to the training loss value, the network parameters are updated by the gradient descent method; and the verification data is input into the hypernetwork after the network parameters are updated, and the first prediction label is obtained through the hypernetwork operation after the network parameters are updated. The first prediction label is compared with the real label label of the verification data to calculate the verification loss value; the current structural parameters of the hypernetwork after the network parameters are updated are obtained, and the auxiliary loss value is calculated according to the current structural parameters; according to the verification loss value and the auxiliary loss value, the structural parameters are updated by the gradient descent method until the training of the hypernetwork is stopped.
[0162] After stopping the training of the hypernetwork, each structural parameter in the trained hypernetwork is normalized based on the Sigmoid function to obtain the normalized structural parameter, and the network structure whose normalized structural parameter is greater than the set parameter threshold is selected as the network structure in the target network model. The target network model for processing image tasks is searched based on the method provided by the embodiment of the present disclosure, which can reduce the error between the predicted label output by the target network model and the real label.
[0163] In the fair differentiable neural network architecture search of the present invention, after determining the current structural parameters, the auxiliary loss value is determined based on the current structural parameters. By associating the current structural parameters with the auxiliary loss value, when the structural parameters need to be updated based on the auxiliary loss value in the future, the value of the structural parameter to be updated can be moved in the inverse direction of the auxiliary loss value, thereby making the updated structural parameter approach the set structural parameter value, for example, 0 or 1, to improve the accuracy of model training.
[0164] The disclosed embodiment proposes a method for reducing the discretization deviation of a neural network in a fair differentiable neural network search, and adds an auxiliary loss function for controlling structural parameters to control the optimization process. The auxiliary loss function can make the value of the structural parameter after the sigmoid function operation approach 0 or 1 after discretization, thereby reducing the discretization deviation of the neural network structure, so that the neural network structure finally searched out is better.
[0165] Figure 7 is a block diagram of a data processing device according to an exemplary embodiment. Figure 7 As shown, the data processing device 700 mainly includes:
[0166] The first updating module 701 is configured to input each labeled training data in the training set into the predetermined model to be trained, and update the model parameters of the predetermined model, wherein the model parameters include: structural parameters;
[0167] A first acquisition module 702 is configured to input each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label;
[0168] A second acquisition module 703 is configured to obtain a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data;
[0169] A first determination module 704 is configured to determine an auxiliary loss value according to current structural parameters of the predetermined model;
[0170] A second determination module 705 is configured to determine whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value;
[0171] The classification module 706 is configured to classify the data to be classified based on the target network model constructed based on the network structure included in the trained predetermined model after stopping the training of the predetermined model to obtain a classification result.
[0172] In other optional embodiments, the device 700 further includes:
[0173] A first processing module is configured to use an activation function to normalize the current structural parameters of the predetermined model after the model parameters are updated to obtain the normalized current structural parameters;
[0174] The first determination module 704 is further configured to:
[0175] The auxiliary loss value is determined according to the normalized current structural parameters.
[0176] In other optional embodiments, the second determining module 705 is further configured to:
[0177] Determine a weighted sum of the verification loss value and the auxiliary loss value according to the verification loss value, the auxiliary loss value and the weight coefficient to obtain a total loss value of the predetermined model;
[0178] When the numerical change of the total loss value within a set time period is less than a set change threshold, the training of the predetermined model is stopped.
[0179] In other optional embodiments, the device 700 further includes:
[0180] A second processing module is configured to normalize each structural parameter in the trained predetermined model based on an activation function after stopping training the predetermined model to obtain a normalized structural parameter;
[0181] A third determination module is configured to determine, from the trained predetermined model, a network structure whose normalized structural parameter is greater than a set parameter threshold;
[0182] A construction module, configured to construct a target network model based on the network structure whose normalized structural parameter is greater than the set parameter threshold;
[0183] The classification module is further configured to classify the data to be classified based on the target network model to obtain the classification result.
[0184] In other optional embodiments, the classification module is further configured to:
[0185] Input the data to be classified into the target network model, and output M category probabilities of the data to be classified in M categories; wherein the category labels corresponding to the first preset number of category probabilities among the M category probabilities are the classification results of the data to be classified;
[0186] The type of the data to be classified includes at least one of the following: image data type, text data type and audio data type. In other optional embodiments, the model parameters also include: network parameters; the first update module 701 is further configured to:
[0187] Input each of the labeled training data in the training set into the predetermined model to be trained to obtain a second prediction label;
[0188] Obtaining a training loss value according to a difference between the second predicted label and the labeled label of the labeled training data;
[0189] Based on the training loss value, updating the network parameters of the predetermined model;
[0190] Each of the labeled verification data in the verification set is input into the predetermined model after the network parameters are updated to update the structural parameters.
[0191] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0192] Figure 8 1 is a block diagram of a data processing device 1200 according to an exemplary embodiment. For example, the device 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0193] Reference Figure 8 , the device 1200 may include one or more of the following components: a processing component 1202 , a memory 1204 , a power component 1206 , a multimedia component 1208 , an audio component 1210 , an input / output (I / O) interface 1212 , a sensor component 1214 , and a communication component 1216 .
[0194] The processing component 1202 generally controls the overall operation of the device 1200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1202 may include one or more modules to facilitate the interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module to facilitate the interaction between the multimedia component 1208 and the processing component 1202.
[0195] The memory 1204 is configured to store various types of data to support operations on the device 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0196] The power supply component 1206 provides power to the various components of the device 1200. The power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1200.
[0197] The multimedia component 1208 includes a screen that provides an output interface between the device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front camera and / or a rear camera. When the device 1200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0198] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC), and when the device 1200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1204 or sent via the communication component 1216. In some embodiments, the audio component 1210 also includes a speaker for outputting audio signals.
[0199] I / O interface 1212 provides an interface between processing component 1202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0200] The sensor assembly 1214 includes one or more sensors for providing various aspects of the status assessment of the device 1200. For example, the sensor assembly 1214 can detect the open / closed state of the device 1200, the relative positioning of components, such as the display and keypad of the device 1200, the sensor assembly 1214 can also detect the position change of the device 1200 or a component of the device 1200, the presence or absence of user contact with the device 1200, the orientation or acceleration / deceleration of the device 1200, and the temperature change of the device 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1214 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0201] The communication component 1216 is configured to facilitate wired or wireless communication between the device 1200 and other devices. The device 1200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0202] In an exemplary embodiment, the device 1200 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned methods.
[0203] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1204 including instructions, and the instructions can be executed by the processor 1220 of the device 1200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0204] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a data processing method, the method comprising:
[0205] Inputting each labeled training data in the training set into a predetermined model to be trained, and updating model parameters of the predetermined model, wherein the model parameters include: structural parameters;
[0206] Inputting each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label;
[0207] Obtaining a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data;
[0208] Determining the auxiliary loss value according to the current structural parameters of the predetermined model;
[0209] Determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value;
[0210] After stopping the training of the predetermined model, the target network model constructed based on the network structure included in the trained predetermined model classifies the data to be classified to obtain a classification result.
[0211] Fig. 9 1 is another block diagram of a data processing device 1300 according to an exemplary embodiment. For example, the device 1300 may be provided as a server. Fig. 9 The apparatus 1300 includes a processing component 1322, which further includes one or more processors, and a memory resource represented by a memory 1332 for storing instructions executable by the processing component 1322, such as an application. The application stored in the memory 1332 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1322 is configured to execute instructions to perform the above-mentioned data processing method, which includes:
[0212] Inputting each labeled training data in the training set into a predetermined model to be trained, and updating model parameters of the predetermined model, wherein the model parameters include: structural parameters;
[0213] Inputting each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label;
[0214] Obtaining a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data;
[0215] Determining the auxiliary loss value according to the current structural parameters of the predetermined model;
[0216] Determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value;
[0217] After stopping the training of the predetermined model, the target network model constructed based on the network structure included in the trained predetermined model classifies the data to be classified to obtain a classification result.
[0218] The device 1300 may also include a power supply component 1326 configured to perform power management of the device 1300, a wired or wireless network interface 1350 configured to connect the device 1300 to a network, and an input / output (I / O) interface 1358. The device 1300 may operate based on an operating system stored in the memory 1332, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.
[0219] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0220] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: include: Inputting each labeled training data in the training set into a predetermined model to be trained, and updating model parameters of the predetermined model, wherein the model parameters include: structural parameters; Inputting each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label; Obtaining a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data; Determining the auxiliary loss value according to the current structural parameters of the predetermined model; Determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value; After stopping the training of the predetermined model, normalizing each structural parameter in the trained predetermined model based on the activation function to obtain normalized structural parameters; Determining, from the trained predetermined model, a network structure whose normalized structural parameter value is greater than a set parameter threshold; Based on the network structure whose normalized structural parameter value is greater than the set parameter threshold, a target network model is constructed; Input the data to be classified into the target network model, and output M category probabilities of the data to be classified in M categories; Among them, the category labels corresponding to the first preset number of category probabilities among the M category probabilities are the classification results of the data to be classified, and the type of the data to be classified includes at least one of the following: image data type, text data type and audio data type.
2. The method according to claim 1, characterized in that The method further comprises: Using an activation function to normalize the current structural parameters of the predetermined model after the model parameters are updated, to obtain the normalized current structural parameters; The determining of the auxiliary loss value according to the current structural parameters of the predetermined model includes: The auxiliary loss value is determined according to the normalized current structural parameters.
3. The method according to claim 1, characterized in that The step of determining whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value comprises: Determine a weighted sum of the verification loss value and the auxiliary loss value according to the verification loss value, the auxiliary loss value and the weight coefficient to obtain a total loss value of the predetermined model; When the numerical change of the total loss value within a set time period is less than a set change threshold, the training of the predetermined model is stopped.
4. The method according to claim 1, characterized in that: The model parameters also include: network parameters; The step of inputting each labeled training data in the training set into a predetermined model to be trained and updating the model parameters of the predetermined model comprises: Input each of the labeled training data in the training set into the predetermined model to be trained to obtain a second prediction label; Obtaining a training loss value according to a difference between the second predicted label and the labeled label of the labeled training data; Based on the training loss value, updating the network parameters of the predetermined model; Each of the labeled verification data in the verification set is input into the predetermined model after the network parameters are updated to update the structural parameters.
5. A data processing device, characterized in that: include: A first updating module is configured to input each labeled training data in the training set into a predetermined model to be trained, and update the model parameters of the predetermined model, wherein the model parameters include: structural parameters; A first acquisition module is configured to input each labeled verification data in the verification set into the predetermined model after the model parameters are updated to obtain a first prediction label; A second acquisition module is configured to obtain a verification loss value according to a difference between the first predicted label and the labeled label of the labeled verification data; A first determination module is configured to determine an auxiliary loss value according to current structural parameters of the predetermined model; A second determination module is configured to determine whether to stop training the predetermined model according to the verification loss value and the auxiliary loss value; The classification module is configured to, after stopping training the predetermined model, normalize each structural parameter in the trained predetermined model based on the activation function to obtain a normalized structural parameter; determine a network structure whose normalized structural parameter value is greater than a set parameter threshold from the trained predetermined model; construct a target network model based on the network structure whose normalized structural parameter value is greater than the set parameter threshold; input the data to be classified into the target network model, and output M category probabilities of the data to be classified in M categories; Among them, the category labels corresponding to the first preset number of category probabilities among the M category probabilities are the classification results of the data to be classified, and the type of the data to be classified includes at least one of the following: image data type, text data type and audio data type.
6. The device according to claim 5, characterized in that The device also includes: A first processing module is configured to use an activation function to normalize the current structural parameters of the predetermined model after the model parameters are updated to obtain the normalized current structural parameters; The first determining module is further configured to: The auxiliary loss value is determined according to the normalized current structural parameters.
7. The device according to claim 5, characterized in that The second determining module is further configured to: Determine a weighted sum of the verification loss value and the auxiliary loss value according to the verification loss value, the auxiliary loss value and the weight coefficient to obtain a total loss value of the predetermined model; When the numerical change of the total loss value within a set time period is less than a set change threshold, the training of the predetermined model is stopped.
8. The device according to claim 5, characterized in that The model parameters also include: network parameters; the first update module is further configured to: Input each of the labeled training data in the training set into the predetermined model to be trained to obtain a second prediction label; Obtaining a training loss value according to a difference between the second predicted label and the labeled label of the labeled training data; Based on the training loss value, updating the network parameters of the predetermined model; Each of the labeled verification data in the verification set is input into the predetermined model after the network parameters are updated to update the structural parameters.
9. A data processing device, characterized in that: include: processor; a memory configured to store processor-executable instructions; Wherein, the processor is configured to: implement the steps in any one of the data processing methods in claims 1 to 4 when executed.
10. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a data processing device, the device is enabled to perform any one of the data processing methods of claims 1 to 4.
