Deep learning algorithm operation and generation method and device

By receiving and running the executable files of the deep learning algorithm model, the problem of limited equipment resources is solved, the operation of deep learning algorithms is realized, and the problem of mismatch in the runtime library update is avoided, and efficiency and accuracy are improved.

CN119227828APending Publication Date: 2024-12-31HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310792920.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

On devices with limited capabilities, deep learning algorithms are difficult to run because they need to load a large number of operators in advance, resulting in too large system resources occupies and cannot implement the algorithm.

Method used

By receiving the executable file sent by the algorithm model generation end, the deep learning algorithm is directly run on the device, avoiding obtaining operators from the runtime library, reducing memory usage, and solving the problem of mismatch in the runtime library updates.

Benefits of technology

It realizes running deep learning algorithms on devices with limited capabilities, reduces memory usage, avoids the problem of mismatch in runtime library updates, and improves inference speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227828A_ABST
    Figure CN119227828A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a deep learning algorithm operation and generation method and device, and relates to the field of deep learning. The method comprises the following steps: receiving an algorithm model file of a target algorithm sent by an algorithm model generation end; and when the algorithm model file is an executable file which can be operated by the algorithm model operation end, realizing a target algorithm based on the executable file. According to the scheme provided by the embodiment of the invention, the algorithm model file sent by the algorithm model generation end is received, and when the algorithm model file is the executable file, equipment with limited capabilities, such as a user end or an edge end, can run the algorithm model only based on the executable file, so that the target algorithm is realized; and the operation of the deep learning algorithm can be realized by equipment with limited capabilities, such as a user side or an edge side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning, and in particular to a method and device for running and generating a deep learning algorithm. Background Art

[0002] In the field of deep learning, deep learning frameworks can be used for model training or model reasoning. At present, the main deep learning frameworks are Tensorflow, Caffe, Theano, MXNet, Torch and PyTorch. In order to implement the algorithms involved in the deep learning framework, it is necessary to establish a runtime library containing various operators in the relevant technology, and implement these algorithms by calling the operators in the runtime library. However, depending on the application scenario, the operators included in the algorithm are often different, and it is difficult to know in advance what operators are included in the algorithm. Therefore, in order to include the operators involved in the algorithm in the runtime library as much as possible, a large number of operators need to be pre-loaded in the runtime library, and loading operators requires a certain amount of system resources.

[0003] However, the system resources of some edge devices or end-side devices are often limited, and a large number of operators cannot be pre-loaded in the runtime library, which makes it impossible to implement these algorithms by calling the operators in the runtime library, that is, these algorithms cannot be implemented on these devices. Therefore, how to implement the operation of deep learning algorithms on devices with limited capabilities has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method for running a deep learning algorithm so as to implement the running of the deep learning algorithm on a device with limited capabilities.

[0005] In a first aspect, an embodiment of the present application provides a method for operating a deep learning algorithm, which is applied to an algorithm model operation end, and the method includes:

[0006] Receive the algorithm model file of the target algorithm sent by the algorithm model generation end;

[0007] When the algorithm model file is an executable file that can be run by the algorithm model running end, the target algorithm is implemented based on the executable file.

[0008] In a possible implementation manner, the algorithm model file includes the algorithm model of the target algorithm, the operator implementation method, and the corresponding relationship between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model;

[0009] The method further comprises:

[0010] Determine the calculation steps for implementing the target algorithm according to the algorithm model;

[0011] For each of the calculation steps, determining the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship;

[0012] According to the determined implementation mode, each of the calculation steps is implemented.

[0013] In a possible implementation, determining the calculation steps for implementing the target algorithm according to the algorithm model includes:

[0014] Determine each calculation step of positively implementing the target algorithm according to the algorithm model;

[0015] The step of implementing each of the calculation steps according to the determined implementation method includes:

[0016] According to the determined implementation method, each of the calculation steps is implemented for the data to be inferred to obtain the inference result of the data to be inferred.

[0017] In a possible implementation, the target algorithm is an algorithm to be trained, and determining the calculation steps for implementing the target algorithm according to the algorithm model includes:

[0018] Determine the calculation steps for reversely implementing the target algorithm according to the algorithm model;

[0019] The step of implementing each of the calculation steps according to the determined implementation method includes:

[0020] According to the determined implementation method, each of the calculation steps is implemented for the error to obtain an adjustment method for each model parameter in the target algorithm; the error is the difference between the inference result output by the target algorithm and the true value;

[0021] The model parameters of the target algorithm are adjusted according to the adjustment method.

[0022] In a possible implementation manner, the algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model;

[0023] or,

[0024] The algorithm model file is an executable file generated based on an instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

[0025] In a second aspect, an embodiment of the present application provides a method for generating a deep learning algorithm framework, which is applied to an algorithm model generation end, and the method includes:

[0026] Generate an algorithm model file for the target algorithm;

[0027] The algorithm model file is sent to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end.

[0028] In a possible implementation manner, the algorithm model file includes the algorithm model of the target algorithm, the operator implementation method, and the corresponding relationship between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model;

[0029] The sending of the algorithm model file to the algorithm model running end so that the algorithm model running end implements the target algorithm based on the implementation manner represented by the algorithm model file includes:

[0030] The algorithm model file is sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps according to the determined implementation method.

[0031] In a possible implementation, the operator includes an operator involved in each calculation step of the forward implementation of the target algorithm;

[0032] The sending of the algorithm model file to the algorithm model running end so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps according to the determined implementation method, including:

[0033] The algorithm model, the operator implementation method and the corresponding relationship are sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps for positively implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each of the calculation steps for the data to be inferred, and obtains the inference result of the data to be inferred.

[0034] In a possible implementation, the operator further includes an operator involved in reversely implementing each calculation step of the target algorithm;

[0035] The sending of the algorithm model file to the algorithm model running end so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps according to the determined implementation method, including:

[0036] The algorithm model, the operator implementation method and the corresponding relationship are sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of reversely implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each of the calculation steps according to the error to obtain an adjustment method for each model parameter in the target algorithm, wherein the error is the difference between the inference result output by the target algorithm and the true value; and adjusts each of the model parameters of the target algorithm according to the adjustment method.

[0037] In a possible implementation manner, the algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model;

[0038] or,

[0039] The algorithm model file is an executable file generated based on an instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

[0040] In a third aspect, an embodiment of the present application provides a deep learning algorithm operation device, which is applied to an algorithm model operation end, and the device includes:

[0041] A receiving module, used for receiving an algorithm model file of a target algorithm sent by an algorithm model generating end;

[0042] An algorithm implementation module, used for implementing the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end;

[0043] In a possible implementation manner, the algorithm model file includes an algorithm model of the target algorithm, an operator implementation method, and a correspondence between the operator and the operator implementation method, wherein the operator implementation method includes an implementation method of the operator involved in running the algorithm model; the device further includes:

[0044] A step determination module, used to determine each calculation step of implementing the target algorithm according to the algorithm model;

[0045] An implementation method determination module, used to determine, for each of the calculation steps, an implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship;

[0046] A step implementation module, used to implement each of the calculation steps according to the determined implementation method;

[0047] In a possible implementation, the step determination module includes:

[0048] A forward implementation step determination submodule, used to determine each calculation step of forward implementing the target algorithm according to the algorithm model;

[0049] The step implementation module is specifically used to implement each of the calculation steps for the data to be inferred according to the determined implementation method, so as to obtain the inference result of the data to be inferred;

[0050] In a possible implementation, the algorithm model is an algorithm to be trained, and the step determination module further includes:

[0051] A reverse implementation step determination submodule, used to determine the calculation steps of reversely implementing the target algorithm according to the target algorithm;

[0052] The step implementation module is also used to implement each of the calculation steps according to the determined implementation method, targeting the error, and obtain an adjustment method for each model parameter in the target algorithm; the error is the difference between the inference result output by the target algorithm and the true value; and the model parameters of the target algorithm are adjusted according to the adjustment method.

[0053] In a possible implementation manner, the algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model;

[0054] or,

[0055] The algorithm model file is an executable file generated based on the instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

[0056] In a fourth aspect, an embodiment of the present application provides a device for generating a deep learning algorithm framework, which is applied to an algorithm model generation end, and the device includes:

[0057] A generation module, used to generate an algorithm model file of a target algorithm;

[0058] A sending module, used for sending the algorithm model file to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end;

[0059] In a possible implementation, the algorithm model file includes the algorithm model of the target algorithm, the operator implementation method and the correspondence between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model; the sending module is specifically used to send the algorithm model file to the algorithm model running end, so that the algorithm model running end determines each calculation step for implementing the target algorithm according to the algorithm model, determines the implementation method corresponding to the operator involved in the calculation step according to the correspondence for each calculation step, and implements each calculation step according to the determined implementation method;

[0060] In a possible implementation, the operator includes an operator involved in each calculation step of the forward implementation of the target algorithm;

[0061] The sending module is specifically used to send the algorithm model, the operator implementation method and the corresponding relationship to the algorithm model running end, so that the algorithm model running end determines each calculation step of positively implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps for the data to be inferred according to the determined implementation method to obtain the inference result of the data to be inferred;

[0062] In a possible implementation, the operator further includes an operator involved in reversely implementing each calculation step of the target algorithm;

[0063] The sending module is specifically used to send the algorithm model, the operator implementation method and the corresponding relationship to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of the target algorithm to be reversely implemented according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each of the calculation steps according to the error to obtain the adjustment method of each model parameter in the target algorithm, wherein the error is the difference between the inference result output by the target algorithm and the true value; and adjusts the various model parameters of the target algorithm according to the adjustment method.

[0064] In a possible implementation manner, the algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model;

[0065] or,

[0066] The algorithm model file is an executable file generated based on the instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

[0067] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0068] Memory, used to store computer programs;

[0069] The processor is used to implement the operating method of the deep learning algorithm described in any of the embodiments of the present application when executing the program stored in the memory.

[0070] In a sixth aspect, an embodiment of the present application provides an electronic device, including:

[0071] Memory, used to store computer programs;

[0072] The processor is used to implement the method for generating the deep learning algorithm framework described in any of the embodiments of the present application when executing the program stored in the memory.

[0073] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements a method for operating any deep learning algorithm described in the present application.

[0074] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating a deep learning algorithm framework described in any one of the present applications is implemented.

[0075] The method for generating a deep learning algorithm framework provided in the embodiment of the present application receives an algorithm model file sent by an algorithm model generation end. When the algorithm model file is an executable file that can be run by an algorithm model running end, the target algorithm is implemented based on the executable file. In this way, compared with the prior art in which a runtime library is set up and the memory volume is large, the present application pre-receives an algorithm model file that can be run by an algorithm model running end and sent by an algorithm model generation end. Devices with limited capabilities such as user terminals or edge terminals only need to run the algorithm model based on the executable file to implement the target algorithm without obtaining operators from the runtime library. Therefore, there is no need to set up a runtime library, thereby reducing the memory usage of devices with limited capabilities such as user terminals or edge terminals.

[0076] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0078] Figure 1 A first schematic diagram of a method for operating a deep learning algorithm provided in an embodiment of the present application;

[0079] Figure 2 A second schematic diagram of a method for operating a deep learning algorithm provided in an embodiment of the present application;

[0080] Figure 3 An example diagram of a method for operating a deep learning algorithm in the prior art provided in an embodiment of the present application;

[0081] Figure 4 An example diagram of a method for operating a deep learning algorithm provided in an embodiment of the present application;

[0082] Figure 5 A schematic diagram of a method for generating a deep learning algorithm framework provided in an embodiment of the present application;

[0083] Figure 6 A schematic diagram of the structure of a device for running a deep learning algorithm provided in an embodiment of the present application;

[0084] Figure 7 A schematic diagram of the structure of a device for generating a deep learning algorithm framework provided in an embodiment of the present application;

[0085] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0087] First, the professional terms in the embodiments of the present application are explained:

[0088] Deep learning: Developed based on traditional neural networks in machine learning, the model level is deeper.

[0089] In order to implement the operation of deep learning algorithms on devices with limited capabilities, the first aspect of the embodiments of the present application first provides an operation method of a deep learning algorithm, which can be applied to electronic devices. In specific applications, the electronic device can be a server or a terminal device, both of which are within the scope of protection of this application.

[0090] See also Figure 1 , the embodiment of the present application provides a method for operating a deep learning algorithm, which is applied to an algorithm model operation end, and the method includes:

[0091] Step S11, receiving the algorithm model file of the target algorithm sent by the algorithm model generation end.

[0092] The algorithm model file may be a file including the algorithm model of the target algorithm, the operator implementation method, and the correspondence between the operator and the operator implementation method, or an executable file. The algorithm model file is generated by the algorithm model generation end, and there are multiple ways to generate the algorithm model file. Specifically, the algorithm model file may include the model structure, model parameters, and a set of operator libraries involved in the process of running the algorithm model, or the model structure of the algorithm model and the operators involved in the process of running the algorithm model may be compiled into an instruction sequence, while the model parameters are made to exist in a constant form, and the operator library is no longer set, and an executable file is generated based on the instruction sequence.

[0093] Step S12: When the algorithm model file is an executable file that can be run by the algorithm model running end, the target algorithm is implemented based on the executable file.

[0094] Among them, the executable file is a file that can be directly run by the algorithm model running end. After receiving the algorithm model file of the target algorithm, since the algorithm model file is an executable file, the target algorithm can be implemented by running the executable file.

[0095] By adopting the method of the embodiment of the present application, on the one hand, compared with setting up a runtime library in the prior art, the memory size is larger. The present application receives an executable file that can be run by the algorithm model running end and is sent by the algorithm model generation end. Devices with limited capabilities such as the user end or the edge end only need to run the algorithm model based on the executable file to implement the target algorithm without obtaining operators from the runtime library. Therefore, there is no need to set up a runtime library, thereby reducing the memory usage of devices with limited capabilities such as the user end or the edge end.

[0096] On the other hand, the setting of the runtime library in the prior art is prone to the problem of mismatch between the algorithm model and the runtime library due to the runtime library not being updated in time. However, since the algorithm model file in the present application is an executable file, the operators involved in running the algorithm model are included in the executable file without the need to be obtained from the runtime library. Therefore, even if there are new operators, it is only necessary to include the new operators in the executable file without updating the runtime library. In this way, the algorithm model running end can run the algorithm model based on the executable file, thereby realizing the target algorithm. Therefore, the problem of mismatch between the algorithm model and the runtime library due to the runtime library not being updated in time can be avoided.

[0097] In another embodiment, the algorithm model file can characterize the implementation method of the target algorithm. Specifically, the algorithm model file can characterize the specific logic and calculation process of implementing the target algorithm. Exemplarily, when implementing the target algorithm A, it is necessary to first perform convolution processing, then perform pooling processing, and finally perform full connection processing. Then the algorithm model file of the target algorithm A can characterize that when implementing the target algorithm A, it is necessary to first perform convolution processing, then perform pooling processing, and finally perform full connection processing, and the algorithm model file of the target algorithm A can characterize the specific calculation process of convolution processing, pooling processing, and full connection processing.

[0098] When the algorithm model file represents the implementation method of the target algorithm, running the algorithm model file can also implement the target algorithm. Exemplarily, the algorithm model file of the target algorithm A can represent that when implementing the target algorithm A, convolution processing must be performed first, followed by pooling processing, and finally full connection processing. After running the algorithm model file, the target algorithm A can be implemented by first performing convolution processing, then performing pooling processing, and finally performing full connection processing.

[0099] In a possible implementation, the algorithm model file includes an algorithm model of a target algorithm, an operator implementation method, and a correspondence between operators and operator implementation methods, and the operator implementation method includes an implementation method of an operator involved in running the algorithm model;

[0100] The operator implementation includes the implementation of all operators involved in the running algorithm model. Exemplarily, if the operators involved in the running algorithm model include operator A and operator B, the operator implementation includes the implementation of operator A and operator B.

[0101] like Figure 2 As shown, the above method also includes:

[0102] Step S13, determining the calculation steps for implementing the target algorithm according to the algorithm model;

[0103] The computational steps to implement the target algorithm refer to: a series of computational steps that need to be performed when using the algorithm model for training or reasoning. The computational steps to implement the target algorithm are determined according to the specific algorithm model. Exemplarily, the computational steps may include data preprocessing, feature extraction and other steps.

[0104] Step S14, for each calculation step, determining the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship;

[0105] The operator refers to a data processing operation or function, and the implementation of the operator refers to the code that specifically implements the operator. The implementation of the operator involved in each calculation step is also different in different algorithm models.

[0106] The algorithm model running end finds the corresponding implementation of the operator involved in each calculation step according to the correspondence between the operator and the implementation of the operator. For example, in a certain model training process, it is necessary to perform linear regression on the data, and according to the correspondence, it is determined that the corresponding implementation of the linear regression operator is the Liner Regression() function.

[0107] Step S15, implementing each calculation step according to the determined implementation method.

[0108] After determining the operator implementation corresponding to the operator involved in the calculation step according to the above step S14, the calculation step is performed using the operator implementation. Exemplarily, in a model training process, when linear regression is performed on data, the implementation corresponding to the linear regression operator is the Liner Regression() function, and the Liner Regression() function is used to perform linear regression on the data.

[0109] Compared with setting up a runtime library in the prior art, the method of the embodiment of the present application has a larger memory size. The present application pre-receives the algorithm model, operator implementation method and the correspondence between operators and operator implementation methods of the target algorithm sent by the algorithm model generation end. Devices with limited capabilities such as the user end or edge end only need to determine the implementation method of the operators involved in each calculation step of the running algorithm model according to the correspondence between the operators and the operator implementation methods to implement each calculation step of the target algorithm, thereby realizing the operation of the deep learning algorithm without obtaining the operators from the runtime library. Therefore, there is no need to set up the runtime library, thereby reducing the memory occupancy of devices with limited capabilities such as the user end or edge end.

[0110] For a clearer explanation, Figure 3As shown, in the prior art, deep learning algorithm training or reasoning is implemented based on a runtime library or operator library. After the algorithm model training is completed, the model file is generated through model format conversion. When the device is training or reasoning, after parsing the model, it needs to load the runtime library, so as to call the functions in the runtime library according to the different operators in the model structure to execute the calculation steps of the algorithm, thereby realizing the model operation. In a possible embodiment, as Figure 4 As shown, after the algorithm model running end in this application receives the algorithm model, it only needs to parse the model without setting up the runtime library, and it can also realize the operation of the deep learning algorithm, that is, the running model.

[0111] In a possible implementation manner, the above step S13 may specifically include:

[0112] Determine the calculation steps of the algorithm to achieve the target in a forward direction according to the algorithm model;

[0113] Among them, the forward realization of the target algorithm refers to the process of obtaining the output result through a series of calculation steps based on the input data and model parameters, and the calculation steps of the forward realization of the target algorithm refer to the calculation steps involved in the process. Specifically, different algorithm models have different calculation steps, and the corresponding calculation steps need to be determined according to the specific algorithm model. Exemplarily, when running a certain inference model, from input data to output results, the calculation steps of the model are: convolution processing, pooling processing, and full connection processing, then the calculation steps of the algorithm for forward realization of the inference model are: convolution processing, pooling processing, and full connection processing.

[0114] The above step S15 may specifically include:

[0115] According to the determined implementation method, each calculation step is implemented for the data to be inferred, and the inference result of the data to be inferred is obtained.

[0116] Specifically, after determining the calculation steps of the forward realization target algorithm, determine the operators involved in each calculation step, and then determine the implementation corresponding to the operator involved in each calculation step according to the corresponding relationship between the operator and the operator implementation method, and finally implement the calculation step according to the implementation corresponding to the operator involved in each calculation step. Exemplarily, the calculation steps of the algorithm for forward realization of a certain reasoning model are determined to be: step A, step B, step C, then first determine the operator a involved in step A, the operator b involved in step B, and the operator c involved in step C, and then determine the implementation methods X, Y, and Z corresponding to operators a, b, and c, and finally use implementation method X to implement calculation step A, use implementation method Y to implement calculation step B, and use implementation method Z to implement calculation step C. It can be understood that the calculation result of calculation step C is the reasoning result, so the reasoning result can be obtained by implementing calculation step C.

[0117] By adopting the method of the embodiment of the present application, the algorithm model running end only needs to determine the various calculation steps of the forward implementation target algorithm according to the algorithm model, determine the operators involved in each calculation step, and then determine the implementation method corresponding to the operator involved in each calculation step according to the correspondence between the operator and the operator implementation method, and then the calculation steps can be implemented according to the implementation method corresponding to the operator involved in each calculation step, thereby realizing the operation of the deep learning algorithm. In this process, the space required to obtain only the implementation method corresponding to the operator involved in the calculation steps of the forward implementation target algorithm is small, which reduces the storage space occupied by the algorithm model running end and improves the reasoning speed.

[0118] In a possible implementation, the target algorithm is an algorithm to be trained, and the above step S13 may specifically include:

[0119] Determine the calculation steps of the reverse target algorithm according to the algorithm model;

[0120] Among them, the reverse realization target algorithm refers to the process of deriving or adjusting the model parameters through a series of calculation steps based on the known input data and output results, and the calculation steps of the reverse realization target algorithm refer to the calculation steps involved in the process. Specifically, if the algorithm model is a model to be trained, the calculation steps of the reverse realization target algorithm refer to the calculation steps in the process of adjusting the parameters of the model to be trained according to the error between the inference result output by the model to be trained and the true value. Exemplarily, assuming that the algorithm model is a model to be trained, after executing the above steps S021 and S041 to obtain the inference result of the model to be trained, the difference between the inference result and the true value is large, then it is necessary to adjust the model parameters of the model to be trained according to the difference to reduce the difference between the inference result and the true value. If the calculation steps for adjusting the model parameters of the model to be trained according to the difference are: step L, step M, step N, then the calculation steps of the reverse realization target algorithm are: step L, step M, step N, where the input of L is the difference and the output of N is the adjustment method.

[0121] Therefore, the above step S15 may specifically include:

[0122] Step a, according to the determined implementation method, implement each calculation step for the error, and obtain the adjustment method of each model parameter in the target algorithm; the error is the difference between the inference result output by the target algorithm and the true value;

[0123] Step b: adjusting each model parameter of the target algorithm according to the adjustment method.

[0124] Among them, the error is the difference between the inference result output by the target algorithm and the true value, and the model parameters of the target algorithm need to be adjusted according to the difference between the inference result and the true value. Specifically, after determining the calculation steps for reversely implementing the target algorithm, determine the operators involved in each calculation step, and then determine the implementation method corresponding to the operator involved in each calculation step based on the correspondence between the operator and the operator implementation method, and then implement each calculation step according to the error to obtain the adjustment method of each model parameter in the target algorithm.

[0125] By adopting the method of the embodiment of the present application, the implementation method corresponding to the operator involved in the calculation steps of the reverse implementation target algorithm is obtained, so that the algorithm model running end not only supports reasoning but also supports training. In addition, the algorithm model running end determines the calculation steps of the reverse implementation target algorithm according to the algorithm model, and determines the operators involved in each calculation step. Then, according to the correspondence between the operator and the operator implementation method, the implementation method corresponding to the operator involved in each calculation step is determined. Then, each calculation step is implemented according to the error between the inference result output by the target algorithm and the true value, and the adjustment method of each model parameter in the target algorithm is obtained. Finally, the model parameters of the target algorithm are adjusted according to the adjustment method, which can improve the accuracy of the algorithm model.

[0126] See also Figure 5 , the embodiment of the present application provides a method for generating a deep learning algorithm framework, which is applied to an algorithm model generation end, and the method includes:

[0127] Step S51, generating an algorithm model file of a target algorithm;

[0128] There are many ways to generate an algorithm model file. Specifically, the algorithm model file may include a model structure, model parameters, and a set of operator libraries involved in the process of running the algorithm model. Alternatively, the model structure of the algorithm model and the operators involved in the process of running the algorithm model may be compiled into an instruction sequence, while the model parameters are made to exist in a constant form, and the operator library is no longer set, to generate an executable file.

[0129] Step S52, sending the algorithm model file to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end.

[0130] Among them, the executable file is a file that can be directly run by the algorithm model running end. The algorithm model generation end can include the model structure, model parameters, and the operator library set involved in the process of running the algorithm model in the algorithm model file, and then send the algorithm model file as an executable file to the algorithm model running end. It can also compile the model structure of the algorithm model and the operators involved in the process of running the algorithm model into an instruction sequence, and make the model parameters exist in a constant way, and no longer set the operator library, to generate an executable file, which is the algorithm model file, and send the executable file to the algorithm model running end; after the algorithm model running end receives the algorithm model file of the target algorithm, it can run the algorithm model file to implement the target algorithm.

[0131] Compared with the prior art of setting up a runtime library, the method of the embodiment of the present application has a larger memory size. The present application sends an executable file that can be run by the algorithm model running end to the algorithm model running end. Devices with limited capabilities such as user ends or edge ends only need to run the algorithm model based on the executable file to implement the target algorithm without obtaining operators from the runtime library. Therefore, there is no need to set up a runtime library, thereby reducing the memory occupancy of devices with limited capabilities such as user ends or edge ends.

[0132] In a possible implementation, the algorithm model file includes the algorithm model of the target algorithm, the operator implementation method, and the correspondence between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model.

[0133] The correspondence between operators and operator implementations can be one-to-one, or one operator can correspond to multiple operator implementations. Specifically, when an operator corresponds to only one operator implementation, the operator implementation corresponding to the operator is determined according to the correspondence between the operator and the operator implementation; when an operator corresponds to multiple operator implementations, the operator implementation with the best performance can be selected from the multiple operator implementations corresponding to the operator.

[0134] In a possible embodiment, when generating an algorithm model file, the algorithm model generation end may select an operator implementation method with the best performance from multiple operator implementation methods corresponding to an operator, so that each operator included in the algorithm model file corresponds to only one operator implementation method. In this way, in the algorithm model file sent by the algorithm model generation end to the algorithm model running end, each operator corresponds to an operator implementation method with the best performance, so that when the algorithm model running end runs the algorithm model file, the running efficiency of the algorithm model file is improved. Moreover, each operator in the algorithm model file corresponds to only one operator implementation method. Compared with one operator corresponding to multiple operator implementation methods, the data volume of the algorithm model file is smaller. When the algorithm model file generation end transmits the algorithm model file to the algorithm model running end, the transmission bandwidth can be reduced, and the storage resource occupancy of the algorithm model running end can be reduced.

[0135] The above step S52 can be specifically broken down into:

[0136] Step 1: Send the algorithm model file to the algorithm model running end, so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model. For each calculation step, the implementation method corresponding to the operator involved in the calculation step is determined according to the corresponding relationship, and each calculation step is implemented according to the determined implementation method.

[0137] In one possible implementation, the operator includes the operators involved in each calculation step of the forward implementation target algorithm. The above step 1 can be specifically refined as follows: the algorithm model, the operator implementation method and the corresponding relationship are sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of the forward implementation target algorithm according to the algorithm model, and for each calculation step, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship; according to the determined implementation method, implements each calculation step for the data to be inferred, and obtains the inference result of the data to be inferred.

[0138] Specifically, before sending the algorithm model, operator implementation method and corresponding relationship to the algorithm model running end, the type of the target algorithm can be determined first to determine the operators involved in the calculation steps of the forward implementation of the target algorithm, so that the operators involved in the calculation steps of the forward implementation of the target algorithm by the algorithm model running end can be included in the algorithm model, operator implementation method and corresponding relationship and sent to the algorithm model running end, so that the algorithm model running end can determine the calculation steps of the forward implementation of the target algorithm according to the algorithm model, and for each calculation step, determine the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implement each calculation step for the data to be inferred according to the determined implementation method to obtain the inference result of the data to be inferred.

[0139] By adopting the method of the embodiment of the present application, the algorithm model generation end only includes the operators involved in the calculation steps of the target algorithm positively implemented by the algorithm model running end in the algorithm model, the operator implementation method and the corresponding relationship and sends them to the algorithm model running end, so as to reduce the storage space occupied by the algorithm model running end and improve the reasoning speed of the algorithm model running end.

[0140] In a possible implementation, the operator also includes operators involved in the various calculation steps of the reverse implementation of the target algorithm. The above step 1 can be specifically refined as follows: the algorithm model, the operator implementation method and the corresponding relationship are sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of the reverse implementation of the target algorithm according to the algorithm model, and for each calculation step, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each calculation step according to the error, and obtains the adjustment method of each model parameter in the target algorithm, where the error is the difference between the inference result output by the target algorithm and the true value; adjusts each model parameter of the target algorithm according to the adjustment method.

[0141] Specifically, before sending the algorithm model, operator implementation method and corresponding relationship to the algorithm model running end, the type of the target algorithm can be determined first to determine the calculation steps of the forward implementation of the target algorithm and the operators involved in the calculation steps of the reverse implementation of the target algorithm, so that the calculation steps of the forward implementation of the target algorithm by the algorithm model running end and the operators involved in the calculation steps of the reverse implementation of the target algorithm can be included in the algorithm model, operator implementation method and corresponding relationship and sent to the algorithm model running end, so that the algorithm model running end can determine the calculation steps of the forward implementation of the target algorithm according to the algorithm model, and determine the corresponding relationship for each calculation step according to the corresponding relationship. Determine the implementation method corresponding to the operators involved in the calculation steps of the forward implementation of the target algorithm, implement each calculation step for the training data according to the determined implementation method, and obtain the inference result output by the target algorithm, then determine each calculation step for the reverse implementation of the target algorithm according to the algorithm model, for each calculation step, determine the implementation method corresponding to the operators involved in the calculation steps of the reverse implementation of the target algorithm according to the corresponding relationship, implement each calculation step according to the determined implementation method for the error between the inference result output by the target algorithm and the true value, and obtain the adjustment method of each model parameter in the target algorithm; finally, adjust each model parameter of the target algorithm according to the adjustment method.

[0142] By adopting the method of the embodiment of the present application, when the algorithm model generation end sends the algorithm model, operator implementation method and the correspondence between the operator and the operator implementation method of the target algorithm to the algorithm model running end, the algorithm model generation end also includes the operators involved in the calculation steps of the target algorithm reversely implemented by the algorithm model running end in the algorithm model, the operator implementation method and the correspondence, so that the algorithm model running end not only supports reasoning but also supports training, and the algorithm model running end determines the calculation steps of the target algorithm reversely implemented according to the algorithm model, and determines the operators involved in each calculation step, and then determines the corresponding implementation method of the operator involved in each calculation step according to the correspondence between the operator and the operator implementation method, and then implements each calculation step according to the error between the inference result output by the target algorithm and the true value, and obtains the adjustment method of each model parameter in the target algorithm; finally, adjusts each model parameter of the inference result according to the adjustment method to improve the accuracy of the algorithm model.

[0143] Corresponding to the above method embodiment, Figure 6 As shown, an embodiment of the present application provides a device for running a deep learning algorithm, the device comprising:

[0144] Receiving module 601, used for receiving the algorithm model file of the target algorithm sent by the algorithm model generating end;

[0145] The algorithm implementation module 602 is used to implement the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end.

[0146] In a possible implementation manner, the algorithm model file includes the algorithm model of the target algorithm, the operator implementation method, and the correspondence between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model;

[0147] The above device also includes:

[0148] A step determination module is used to determine the calculation steps for implementing the target algorithm according to the algorithm model;

[0149] An implementation method determination module is used to determine, for each calculation step, the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship;

[0150] A step implementation module, used to implement each calculation step according to the determined implementation method;

[0151] In a possible implementation, the step determination module includes:

[0152] A forward realization step determination submodule is used to determine each calculation step of the forward realization target algorithm according to the algorithm model;

[0153] In a possible implementation, the step implementation module is specifically used to implement each calculation step for the data to be inferred according to the determined implementation mode, so as to obtain the inference result of the data to be inferred;

[0154] In a possible implementation, the algorithm model is an algorithm to be trained, and the step determination module further includes:

[0155] A reverse implementation step determination submodule is used to determine the calculation steps of the reverse implementation target algorithm according to the target algorithm;

[0156] The step implementation module is also used to implement each calculation step according to the determined implementation method, aiming at the error, and obtain the adjustment method of each model parameter in the target algorithm; the error is the difference between the inference result output by the target algorithm and the true value; and the model parameters of the target algorithm are adjusted according to the adjustment method.

[0157] Corresponding to the above method embodiment, Figure 7 As shown, the embodiment of the present application provides a device for generating a deep learning algorithm framework, which is applied to an algorithm model generation end, and the device includes:

[0158] A generating module 701 is used to generate an algorithm model file of a target algorithm;

[0159] A sending module 702 is used to send the algorithm model file of the target algorithm to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end;

[0160] In a possible implementation, the algorithm model file includes the algorithm model of the target algorithm, the operator implementation method and the correspondence between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model; the sending module 702 is specifically used to send the algorithm model file to the algorithm model running end, so that the algorithm model running end determines each calculation step of implementing the target algorithm according to the algorithm model, determines the implementation method corresponding to the operator involved in the calculation step according to the correspondence for each calculation step, and implements each calculation step according to the determined implementation method;

[0161] In a possible implementation, the operator includes operators involved in each calculation step of the forward implementation target algorithm;

[0162] The sending module 702 is specifically used to send the algorithm model, the operator implementation method and the corresponding relationship to the algorithm model running end, so that the algorithm model running end determines each calculation step of the forward implementation target algorithm according to the algorithm model, and for each calculation step, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each calculation step for the data to be inferred according to the determined implementation method to obtain the inference result of the data to be inferred;

[0163] In a possible implementation, the operator also includes operators involved in reversely implementing each calculation step of the target algorithm;

[0164] The sending module 702 is specifically used to send the algorithm model, the operator implementation method and the corresponding relationship to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of the reverse implementation of the target algorithm according to the algorithm model, and for each calculation step, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each calculation step according to the error, and obtains the adjustment method of each model parameter in the target algorithm, where the error is the difference between the inference result output by the target algorithm and the true value; and adjusts each model parameter of the target algorithm according to the adjustment method.

[0165] like Figure 8 As shown, the embodiment of the present application also provides an electronic device, including:

[0166] Memory, used to store computer programs;

[0167] The processor is used to execute the program stored in the memory, and implements the following steps:

[0168] Receive the algorithm model file of the target algorithm sent by the algorithm model generation end;

[0169] When the algorithm model file is an executable file that can be run by the algorithm model running end, the target algorithm is implemented based on the executable file.

[0170] The present application also provides an electronic device, including:

[0171] Memory 801, used for storing computer programs;

[0172] The processor 802 is used to implement the following steps when executing the program stored in the memory:

[0173] Generate an algorithm model file for the target algorithm;

[0174] The algorithm model file is sent to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end.

[0175] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0176] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0177] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the operating method of any of the above-mentioned deep learning algorithms are implemented.

[0178] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating any of the above-mentioned deep learning algorithm frameworks are implemented.

[0179] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute a method for operating any deep learning algorithm in the above embodiments.

[0180] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the method for generating a deep learning algorithm framework in any of the above embodiments.

[0181] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), etc.

[0182] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0183] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0184] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for operating a deep learning algorithm, characterized in that: Applied to the algorithm model running end, the method includes: Receive the algorithm model file of the target algorithm sent by the algorithm model generation end; When the algorithm model file is an executable file that can be run by the algorithm model running end, the target algorithm is implemented based on the executable file.

2. The method according to claim 1, characterized in that The algorithm model file includes the algorithm model of the target algorithm, the operator implementation method and the corresponding relationship between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model; The method further comprises: Determine the calculation steps for implementing the target algorithm according to the algorithm model; For each of the calculation steps, determining the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship; According to the determined implementation mode, each of the calculation steps is implemented.

3. The method according to claim 2, characterized in that Determining the calculation steps for implementing the target algorithm according to the algorithm model includes: Determine each calculation step of positively implementing the target algorithm according to the algorithm model; The step of implementing each of the calculation steps according to the determined implementation method includes: According to the determined implementation method, each of the calculation steps is implemented for the data to be inferred to obtain the inference result of the data to be inferred.

4. The method according to claim 3, characterized in that The target algorithm is an algorithm to be trained, and the steps of determining the calculation steps for implementing the target algorithm according to the algorithm model include: Determine the calculation steps for reversely implementing the target algorithm according to the algorithm model; The step of implementing each of the calculation steps according to the determined implementation method includes: According to the determined implementation method, each of the calculation steps is implemented for the error to obtain an adjustment method for each model parameter in the target algorithm; the error is the difference between the inference result output by the target algorithm and the true value; The model parameters of the target algorithm are adjusted according to the adjustment method.

5. The method according to claim 1, characterized in that: The algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model; or, The algorithm model file is an executable file generated based on an instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

6. A method for generating a deep learning algorithm framework, characterized in that: Applied to the algorithm model generation end, the method includes: Generate an algorithm model file for the target algorithm; The algorithm model file is sent to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end.

7. The method according to claim 6, characterized in that The algorithm model file includes the algorithm model of the target algorithm, the operator implementation method and the corresponding relationship between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model; The sending the algorithm model file to the algorithm model running end so that the algorithm model running end implements the target algorithm based on the implementation manner represented by the algorithm model file includes: The algorithm model file is sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps according to the determined implementation method.

8. The method according to claim 7, characterized in that The operators include operators involved in each calculation step of the forward implementation of the target algorithm; The sending of the algorithm model file to the algorithm model running end so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps according to the determined implementation method, including: The algorithm model, the operator implementation method and the corresponding relationship are sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps for positively implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each of the calculation steps for the data to be inferred, and obtains the inference result of the data to be inferred.

9. The method according to claim 7, characterized in that: The operators also include operators involved in reversely implementing each calculation step of the target algorithm; The sending of the algorithm model file to the algorithm model running end so that the algorithm model running end determines the various calculation steps for implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps according to the determined implementation method, including: The algorithm model, the operator implementation method and the corresponding relationship are sent to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of reversely implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each of the calculation steps according to the error to obtain an adjustment method for each model parameter in the target algorithm, wherein the error is the difference between the inference result output by the target algorithm and the true value; and adjusts each of the model parameters of the target algorithm according to the adjustment method.

10. The method according to claim 6, characterized in that The algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model; or, The algorithm model file is an executable file generated based on an instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

11. A device for running a deep learning algorithm, characterized in that: Applied to the algorithm model running end, the device includes: A receiving module, used for receiving an algorithm model file of a target algorithm sent by an algorithm model generating end; An algorithm implementation module, used for implementing the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end; The algorithm model file includes the algorithm model of the target algorithm, the operator implementation method and the corresponding relationship between the operator and the operator implementation method; the operator implementation method includes the implementation method of the operator involved in running the algorithm model; the device also includes: A step determination module, used to determine each calculation step of implementing the target algorithm according to the algorithm model; An implementation method determination module, used to determine, for each of the calculation steps, an implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship; A step implementation module, used to implement each of the calculation steps according to the determined implementation method; The step determination module comprises: A forward implementation step determination submodule, used to determine each calculation step of forward implementing the target algorithm according to the algorithm model; The step implementation module is specifically used to implement each of the calculation steps for the data to be inferred according to the determined implementation method, so as to obtain the inference result of the data to be inferred; The algorithm model is an algorithm to be trained, and the step determination module further includes: A reverse implementation step determination submodule, used to determine the calculation steps of reversely implementing the target algorithm according to the target algorithm; The step implementation module is further used to implement each of the calculation steps according to the determined implementation method, aiming at the error, and obtain an adjustment method for each model parameter in the target algorithm; the error is the difference between the inference result output by the target algorithm and the true value; and adjust each of the model parameters of the target algorithm according to the adjustment method; The algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model; or, The algorithm model file is an executable file generated based on an instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

12. A device for generating a deep learning algorithm framework, characterized in that: Applied to the algorithm model generation end, the device includes: A generation module, used to generate an algorithm model file of a target algorithm; A sending module, used for sending the algorithm model file to the algorithm model running end, so that the algorithm model running end implements the target algorithm based on the executable file when the algorithm model file is an executable file that can be run by the algorithm model running end; The algorithm model file includes the algorithm model of the target algorithm, the operator implementation method and the correspondence between the operator and the operator implementation method, and the operator implementation method includes the implementation method of the operator involved in running the algorithm model; the sending module is specifically used to send the algorithm model file to the algorithm model running end, so that the algorithm model running end determines each calculation step for implementing the target algorithm according to the algorithm model, determines the implementation method corresponding to the operator involved in the calculation step according to the correspondence for each calculation step, and implements each calculation step according to the determined implementation method; The operators include operators involved in each calculation step of the forward implementation of the target algorithm; The sending module is specifically used to send the algorithm model, the operator implementation method and the corresponding relationship to the algorithm model running end, so that the algorithm model running end determines each calculation step of positively implementing the target algorithm according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and implements each of the calculation steps for the data to be inferred according to the determined implementation method to obtain the inference result of the data to be inferred; The operators also include operators involved in reversely implementing each calculation step of the target algorithm; The sending module is specifically used to send the algorithm model, the operator implementation method and the corresponding relationship to the algorithm model running end, so that the algorithm model running end determines the various calculation steps of the target algorithm to be reversely implemented according to the algorithm model, and for each of the calculation steps, determines the implementation method corresponding to the operator involved in the calculation step according to the corresponding relationship, and according to the determined implementation method, implements each of the calculation steps according to the error to obtain the adjustment method of each model parameter in the target algorithm, wherein the error is the difference between the inference result output by the target algorithm and the true value; and adjusts each of the model parameters of the target algorithm according to the adjustment method; The algorithm model file is a file including the algorithm model structure and model parameters of the target algorithm, and an operator library involved in running the algorithm model; or, The algorithm model file is an executable file generated based on an instruction sequence after the algorithm model and the operators involved in running the algorithm model are compiled into an instruction sequence.

13. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-5 or 6-10 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-5 or 6-10 is implemented.