Model parameter processing method, device, electronic equipment and storage medium
A technology of model parameters and processing methods, applied in the field of machine learning, can solve problems such as the influence of model size, and achieve the effect of reducing size and avoiding model parameter distortion
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0026] Please refer to figure 2 , figure 2 It is a flowchart of steps of a method for processing model parameters provided by a preferred embodiment of the present invention. The method may include the steps of:
[0027] Step S101, according to the model to be processed, obtain a parameter set to be compressed corresponding to the model to be processed.
[0028] The aforementioned model to be processed may be a model parameter file generated after machine learning function training. The above-mentioned model parameter file may include multiple model parameters.
[0029] For a better compression effect, the above-mentioned model to be processed may be a model that has undergone model pruning after training.
[0030]In the embodiment of the present invention, the above-mentioned parameter set to be compressed is a model parameter set corresponding to the model to be processed. The above-mentioned set of parameters to be compressed may be one set or multiple sets. Each se...
Embodiment approach
[0033] As an implementation, the following query statement can be used:
[0034] f_max=A[0];
[0035] f_min=A[0];
[0036] For(inti=0; i
[0037] {
[0039] {
[0040] f_max=A[i];
[0041]}
[0042] Else if(f_min>A[i])
[0043] {
[0044] f_min=A[i];
[0045]}
[0046]}
[0047] The above-mentioned f_max represents the parameter value of the first model parameter. First, the parameter value of the first model parameter in the array is assigned to f_max, and f_max is compared with the parameter value of each model parameter in the array in turn. When there is a model parameter greater than the f_max, change the value of f_max to the model parameter, and continue to repeat the comparison until the comparison with the last model parameter in the array is completed, and the value of f_max is the parameter value of the first model parameter . The above-mentioned f_min represents the parameter value of the second model parameter. First, the ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


