Method for training data processing model, electronic device and storage medium
A method for training a data processing model includes: acquiring sample data; acquiring an initial data processing model, the initial data processing model including a plurality of forward nodes for outputting a plurality of intermediate results corresponding to the sample data; determining a plurality of time-dependent features corresponding to the plurality of forward nodes; acquiring a data processing model to be trained by processing the initial data processing model based on the plurality of time-dependent features; and training the data processing model to be trained using the sample data and the plurality of intermediate results.
1 . A method for processing audio data, executed by an electronic device, comprising:
acquiring sample audio data;
acquiring an initial audio data processing model, the initial audio data processing model comprising a plurality of forward nodes for outputting a plurality of intermediate results corresponding to the sample audio data;
determining a plurality of time-dependent features corresponding to the plurality of forward nodes, wherein the time-dependent feature of the forward node indicates whether there is a time-dimension calculation association relationship between a target forward node and other forward nodes;
acquiring the audio data processing model to be trained by processing the initial audio data processing model based on the plurality of time-dependent features;
acquiring a target audio data processing model by training the audio data processing model to be trained using the sample audio data and the plurality of intermediate results, acquiring audio data to be processed; and
acquiring an audio data processing result output by inputting the audio data to be processed into the target audio data processing model,
wherein acquiring the audio data processing model to be trained by processing the initial audio data processing model based on the plurality of time-dependent features, comprising:
determining the target forward node from the plurality of forward nodes based on the plurality of time-dependent features;
generating a check node corresponding to the target forward node, the check node being configured to output a check result corresponding to the sample audio data, the check result being the same as an intermediate result output by the target forward node; and
generating the audio data processing model to be trained based on the plurality of forward nodes and the check node,
wherein generating the check node corresponding to the target forward node comprises:
determining a check and memory comprehensive benefit value for the target forward node based on a fomula, wherein the formula is recommit_benefit=output_size−input size+recompute_input_size, in which recommit_benefit is the check and memory comprehensive benefit value, output_size is a memory size of an intermediate result output by the target forward node, input_size is a memory size of all inputs for the target forward node, recompute_input_size is a memory size of an input for the target forward node during a reverse calculation of the model process.
2 . The method of claim 1 , wherein, acquiring the target audio data processing model by training the audio data processing model to be trained using the sample audio data and the plurality of intermediate results, comprising:
acquiring the target audio data processing model by training the audio data processing model to be trained using the sample audio data, other intermediate results and the check result;
wherein, the other intermediate results are intermediate results corresponding to the sample audio data output by other forward nodes, and the target forward node and the other forward nodes constitute the plurality of forward nodes.
3 . The method of claim 2 , further comprising:
acquiring the plurality of intermediate results output by the plurality of forward nodes in the audio data processing model to be trained by taking the sample audio data as a forward training input of the audio data processing model to be trained; and
deleting the intermediate result output by the target forward node, and retaining the other intermediate results output by the other forward nodes.
4 . The method of claim 3 , wherein the audio data processing model to be trained comprises a plurality of reverse nodes for outputting predicted tuning parameters corresponding to the sample audio data, the sample audio data having corresponding annotated tuning parameters,
wherein, acquiring the target audio data processing model by training the audio data processing model to be trained using the sample audio data, the other intermediate results and the check result, comprises:
acquiring the check result corresponding to the sample audio data, generated by the check node;
acquiring the predicted tuning parameters output by the plurality of reverse nodes by taking the sample audio data, the other intermediate results, and the check result as a reverse training input of the audio data processing model to be trained; and
taking the trained audio data processing model as the target audio data processing model in response to the predicted tuning parameters and the annotated tuning parameters satisfying a preset condition.
5 . The method of claim 1 , wherein, the time-dependent feature of the target forward node indicates that there is no time-dimension calculation association relationship between the target forward node and other forward nodes.
6 . An electronic device, comprising:
at least one processor; and
a memory communicatively connected to the at least one processor; wherein,
the memory is configured to store instructions executable by the at least one processor, and when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
acquiring sample audio data;
acquiring an initial audio data processing model, the initial audio data processing model comprising a plurality of forward nodes for outputting a plurality of intermediate results corresponding to the sample audio data;
determining a plurality of time-dependent features corresponding to the plurality of forward nodes, wherein the time-dependent feature of the forward node indicates whether there is a time-dimension calculation association relationship between a target forward node and other forward nodes;
acquiring an audio data processing model to be trained by processing the initial audio data processing model based on the plurality of time-dependent features; and
acquiring a target audio data processing model by training the audio data processing model to be trained using the sample audio data and the plurality of intermediate results,
acquiring audio data to be processed; and
acquiring an audio data processing result output by inputting the audio data to be processed into the target audio data processing model,
wherein when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
determining the target forward node from the plurality of forward nodes based on the plurality of time-dependent features;
generating a check node corresponding to the target forward node, the check node being configured to output a check result corresponding to the sample audio data, the check result being the same as an intermediate result output by the target forward node; and
generating the audio data processing model to be trained based on the plurality of forward nodes and the check node,
wherein when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
determining a check and memory comprehensive benefit value for the target forward node based on a fomula, wherein the formula is recommit_benefit=output_size−input_size+recompute_input_size, in which recommit_benefit is the check and memory comprehensive benefit value, output_size is a memory size of an intermediate result output by the target forward node, input_size is a memory size of all inputs for the target forward node, recompute_input_size is a memory size of an input for the target forward node during a reverse calculation of the model process.
7 . The electronic device of claim 6 , wherein when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
acquiring the target audio data processing model by training the audio data processing model to be trained using the sample audio data, other intermediate results and the check result;
wherein, the other intermediate results are intermediate results corresponding to the sample audio data output by other forward nodes, and the target forward node and the other forward nodes constitute the plurality of forward nodes.
8 . The electronic device of claim 7 , wherein when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
acquiring the plurality of intermediate results output by the plurality of forward nodes in the audio data processing model to be trained by taking the sample audio data as a forward training input of the audio data processing model to be trained; and
deleting the intermediate result output by the target forward node, and retaining the other intermediate results output by the other forward nodes.
9 . The electronic device of claim 8 , wherein the audio data processing model to be trained comprises a plurality of reverse nodes for outputting predicted tuning parameters corresponding to the sample audio data, the sample audio data having corresponding annotated tuning parameters,
wherein when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
acquiring the check result corresponding to the sample audio data, generated by the check node;
acquiring the predicted tuning parameters output by the plurality of reverse nodes by taking the sample audio data, the other intermediate results, and the check result as a reverse training input of the audio data processing model to be trained; and
taking the trained audio data processing model as the target audio data processing model in response to the predicted tuning parameters and the annotated tuning parameters satisfying a preset condition.
10 . The electronic device of claim 6 , wherein, the time-dependent feature of the target forward node indicates that there is no time-dimension calculation association relationship between the target forward node and other forward nodes.
11 . The electronic device of claim 6 , wherein when the instructions are performed by the at least one processor, the at least one processor is caused to perform:
acquiring data to be processed; and
acquiring a data processing result output by inputting the data to be processed into the target audio data processing model.
12 . A non-transitory computer-readable storage medium stored with computer instructions, wherein, the computer instructions are configured to cause a computer to perform:
acquiring sample audio data;
acquiring an initial audio data processing model, the initial audio data processing model comprising a plurality of forward nodes for outputting a plurality of intermediate results corresponding to the sample audio data;
determining a plurality of time-dependent features corresponding to the plurality of forward nodes, wherein the time-dependent feature of the forward node indicates whether there is a time-dimension calculation association relationship between a target forward node and other forward nodes;
acquiring an audio data processing model to be trained by processing the initial audio data processing model based on the plurality of time-dependent features;
acquiring a target audio data processing model by training the audio data processing model to be trained using the sample audio data and the plurality of intermediate results,
acquiring audio data to be processed; and
acquiring an audio data processing result output by inputting the audio data to be processed into the target audio data processing model,
wherein, the computer instructions are configured to cause a computer to perform:
determining the target forward node from the plurality of forward nodes based on the plurality of time-dependent features;
generating a check node corresponding to the target forward node, the check node being configured to output a check result corresponding to the sample audio data, the check result being the same as an intermediate result output by the target forward node; and
generating the audio data processing model to be trained based on the plurality of forward nodes and the check node,
wherein generating the check node corresponding to the target forward node comprises:
determining a check and memory comprehensive benefit value for the target forward node based on a formula, wherein the formula is recommit_benefit=output_size−input_size+recompute_input_size, in which recommit_benefit is the check and memory comprehensive benefit value, output_size is a memory size of an intermediate result output by the target forward node, input_size is a memory size of all inputs for the target forward node, recompute_input_size is a memory size of an input for the target forward node during a reverse calculation of the model process.
13 . The non-transitory computer-readable storage medium of claim 12 , wherein, the computer instructions are configured to cause a computer to perform:
acquiring the target audio data processing model by training the audio data processing model to be trained using the sample audio data, other intermediate results and the check result;
wherein, the other intermediate results are intermediate results corresponding to the sample audio data output by other forward nodes, and the target forward node and the other forward nodes constitute the plurality of forward nodes.
14 . The non-transitory computer-readable storage medium of claim 13 , wherein, the computer instructions are configured to cause a computer to perform:
acquiring the plurality of intermediate results output by the plurality of forward nodes in the audio data processing model to be trained by taking the sample audio data as a forward training input of the audio data processing model to be trained; and
deleting the intermediate result output by the target forward node, and retaining the other intermediate results output by the other forward nodes.
15 . The non-transitory computer-readable storage medium of claim 14 , wherein the audio data processing model to be trained comprises a plurality of reverse nodes for outputting predicted tuning parameters corresponding to the sample audio data, the sample audio data having corresponding annotated tuning parameters,
wherein, the computer instructions are configured to cause a computer to perform:
acquiring the check result corresponding to the sample audio data, generated by the check node;
acquiring the predicted tuning parameters output by the plurality of reverse nodes by taking the sample audio data, the other intermediate results, and the check result as a reverse training input of the audio data processing model to be trained; and
taking the trained audio data processing model as the target audio data processing model in response to the predicted tuning parameters and the annotated tuning parameters satisfying a preset condition.
16 . The non-transitory computer-readable storage medium of claim 12 , wherein, the time-dependent feature of the target forward node indicates that there is no time-dimension calculation association relationship between the target forward node and other forward nodes.