CN113469364B - Reasoning platform, method and device - Google Patents

Reasoning platform, method and device Download PDF

Info

Publication number
CN113469364B
CN113469364B CN202010247286.9A CN202010247286A CN113469364B CN 113469364 B CN113469364 B CN 113469364B CN 202010247286 A CN202010247286 A CN 202010247286A CN 113469364 B CN113469364 B CN 113469364B
Authority
CN
China
Prior art keywords
layer
private
private layer
inference
library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010247286.9A
Other languages
Chinese (zh)
Other versions
CN113469364A (en
Inventor
冯仁光
叶挺群
王鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010247286.9A priority Critical patent/CN113469364B/en
Publication of CN113469364A publication Critical patent/CN113469364A/en
Application granted granted Critical
Publication of CN113469364B publication Critical patent/CN113469364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/046Forward inferencing; Production systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The embodiment of the application provides an inference platform, an inference method and an inference device. The reasoning platform comprises a reasoning library and a private layer interface, wherein the private layer interface is used for defining execution logic of a private layer according to layer information of the private layer input through the private layer interface; the inference library is used for executing an input deep learning algorithm model by utilizing a supporting layer which is already covered by the inference library and a registered private layer so as to infer an input image and obtain an inference result; the private layer interface is invoked to execute execution logic for which the executed private layer is defined whenever the executed layer is the private layer. The reasoning platform can complete reasoning of multiple different deep learning models with user-defined private layers, a reasoning library does not need to be developed respectively aiming at different application scenes, development efficiency is improved, labor cost of development is reduced, flexibility of application development is improved, and opening of equipment is achieved.

Description

Reasoning platform, method and device
Technical Field
The application relates to the technical field of deep learning, in particular to an inference platform, an inference method and an inference device.
Background
Forward reasoning calculation is performed by using a neural network model obtained based on deep learning training, and the process is called reasoning. In an actual application scenario, a user may have a certain customization requirement on a network model, for example, an operator, a calculation mode, and the like used for customizing a part of layers of the network model, and these layers customized according to the user requirement are hereinafter referred to as private layers. The network model is different according to the different customized demands of users.
The reasoning can be implemented by a reasoning platform, the reasoning platform comprises a reasoning base, execution logic of various layers is stored in the reasoning base, and the reasoning platform can conduct reasoning according to the execution logic contained in the reasoning base. In the related art, in order to enable the inference platform to complete the inference of the network model including the private layer, a corresponding inference library may be developed in advance for the private layer in the network model, so that the inference library includes execution logic of the private layer. However, the customization needs of different users may be different according to the application scenes. If the inference library is developed for each customized requirement, more time is spent, resulting in lower inference efficiency, and various applications of the user, and if all the works are completed by the inference library developer, the workload is heavy, resulting in difficulty in realizing flexible development of the application for the user.
Disclosure of Invention
The embodiment of the application aims to provide an inference platform, an inference method and an inference device, so that the purpose that corresponding inference libraries are not required to be developed for different application scenes is achieved, the inference efficiency of the inference libraries is improved, the labor cost is reduced, and a user can develop applications more flexibly. The specific technical scheme is as follows:
in a first aspect of an embodiment of the present application, an inference platform is provided, where the inference platform includes an inference library and a private layer interface;
the private layer interface is used for acquiring layer information of a private layer; defining execution logic of the private layer according to the layer information of the private layer; registering the private layer in the reasoning library;
the inference library is used for executing an input deep learning algorithm model by utilizing a supporting layer which is already covered by the inference library and a registered private layer so as to infer an input image and obtain an inference result; and calling the private layer interface whenever the executed layer is the registered private layer, and executing the execution logic of which the executed private layer is defined.
In a possible embodiment, the inference library is specifically configured to execute an input deep learning algorithm model for image recognition by using a supporting layer already covered by the inference library and a registered private layer, so as to recognize an input image and obtain a recognition result.
In a possible embodiment, the private layer interface is further configured to obtain a custom parameter; and executing the execution logic of which the private layer is defined and executed by the reasoning library according to the form configured by the custom parameters when being called by the reasoning library.
In a possible embodiment, the custom parameter is used for configuring system resources occupied by execution force logic defined by an execution private layer, and the private layer interface is specifically used for calling the system resources configured by the custom parameter and executing the execution logic defined by the private layer executed by the inference library. In a possible embodiment, the custom parameter is used for configuring a computing manner of implementing the private layer defined execution logic, and the private layer interface is specifically used for performing computation according to the computing manner configured by the custom parameter so as to execute the private layer defined execution logic executed by the inference library.
In a second aspect of an embodiment of the present application, there is provided an inference method applied to the private layer interface of the inference platform as set forth in any one of the first aspects, the method including:
acquiring layer information of a private layer;
defining execution logic of the private layer according to the layer information; registering the private layer in an inference library, so that the inference library calls the private layer interface when executing the private layer;
executing the execution logic defined by the private layer when called by the inference library.
In one possible embodiment, the method further comprises:
obtaining a custom parameter;
the executing the execution logic defined by the private layer comprises:
executing the execution logic defined by the private layer according to the form configured by the custom parameters.
In a possible embodiment, the custom parameter is used to configure system resources occupied by execution private layer defined execution force logic, and the execution private layer defined execution logic executed by the inference library is executed according to the form configured by the custom parameter, including:
and calling the system resource configured by the custom parameters, and executing the execution logic of which the private layer is defined and executed by the reasoning library.
In a possible embodiment, the custom parameters are used to configure a computing manner of implementing private layer defined execution logic, and the executing the private layer defined execution logic executed by the inference library according to the form configured by the custom parameters includes:
and calculating according to a calculation mode configured by the custom parameters so as to execute the execution logic of which the private layer is defined and executed by the reasoning library.
In a third aspect of an embodiment of the present application, there is provided an inference apparatus applied to the private layer interface of the inference platform as set forth in any one of the first aspect, the apparatus including:
the layer information acquisition module is used for acquiring layer information of the private layer;
the private layer definition module is used for defining execution logic of the private layer according to the layer information; registering the private layer in an inference library, so that the inference library calls the private layer interface when executing the private layer;
and the algorithm implementation module is used for executing the execution logic defined by the private layer when being called by the reasoning library.
In a possible embodiment, the apparatus further includes a parameter acquisition module configured to acquire a custom parameter;
the algorithm implementation module is specifically configured to execute the execution logic defined by the private layer according to the form configured by the custom parameters.
In a possible embodiment, the custom parameter is used for configuring system resources occupied by execution force logic for executing the private layer definition, and the algorithm implementation module is specifically used for calling the system resources configured by the custom parameter and executing the execution logic for executing the private layer definition executed by the inference library.
In a possible embodiment, the custom parameter is used for configuring a calculation mode for implementing the private layer defined execution logic, and the algorithm implementing module is specifically used for calculating according to the calculation mode configured by the custom parameter so as to execute the private layer defined execution logic executed by the inference library.
In a fourth aspect of the embodiment of the present application, there is provided an electronic device, including:
a memory for storing a computer program;
a processor for performing the method steps according to any of the second aspects above when executing a program stored on a memory.
In a fifth aspect of the embodiments of the present application, there is provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the method steps of any of the second aspects described above.
According to the reasoning platform, the method and the device provided by the embodiment of the application, the private layer interface is opened in the reasoning platform, so that the self-defined model can be registered into the reasoning library according to different application scenes, and the model algorithm comprising the customized private layer is realized by a method for calling the private layer interface, so that one reasoning platform can finish reasoning of various different deep learning models with the user-defined private layer, and the corresponding reasoning library is not required to be developed respectively according to different application scenes, thereby improving the development efficiency, reducing the development labor cost, improving the flexibility of application development and realizing the opening of equipment. Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an inference method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an inference platform according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another flow chart of the reasoning method provided by the embodiment of the application;
fig. 4 is a schematic flow chart of a private layer interface algorithm implementation according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an inference apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
For more clearly describing the reasoning platform provided by the embodiment of the application, the reasoning platform may be one electronic device or may be composed of a plurality of electronic devices, and by way of example, the reasoning platform may be an independent server or may be composed of a plurality of servers that establish communication connection with each other, which is not limited in this embodiment. The following describes an reasoning process of the reasoning platform, referring to fig. 1, fig. 1 shows a model reasoning method provided by an embodiment of the present application, where the method may include:
s101, creating an inference library through an inference library interface.
The created inference library may contain a plurality of different layers, and the layers contained in the inference library may be different according to application scenarios, but the layers contained in the inference library are often limited, so that in some application scenarios, one or more layers in the deep learning model used by the user are not contained in the inference library. For convenience of description herein, it is assumed that all layers employed in the deep learning model have been included in the inference library.
S102, inputting the deep learning model and the image to be processed into an inference library.
The deep learning model may be a deep learning model with different functions according to different application scenarios, and exemplary may be a deep learning model for performing image recognition or a deep learning model for extracting video optical flow information, which is not limited in this embodiment. The image to be processed may be a single image or may be a plurality of images, for example, a plurality of consecutive image frames in a video.
S103, the inference library executes the input deep learning model by using the already covered layers so as to process the input image to be processed, and an inference result is obtained.
As in the foregoing analysis, it is assumed here for convenience of description that the various layers employed by the deep learning model have been included in the inference library. Because the inference library can implement the execution logic of these covered layers, the inference library can complete the execution of the deep learning model to obtain an inference result.
The inference library may parse the deep learning model to determine each layer adopted in the deep learning model, find layer information of the layer already covered locally, and implement execution logic of the layer according to the layer information.
However, if at least one layer employed by the deep learning model is not covered in the inference library, the inference library may not implement the execution logic of that layer, resulting in an inability to infer the input image in accordance with the execution logic represented by the model. In the related art, a new inference library can be developed again through the inference library interface, but the time and labor cost for developing the new inference library are high, so that the efficiency of inference is low, and the flexibility of application development is low.
Based on this, an embodiment of the present application provides an inference platform, which may include an inference library 210 and a private layer interface 220 as shown in fig. 2.
The private layer interface 220 is configured to obtain layer information of a private layer, define execution logic of the private layer according to the layer information of the private layer, and register the private layer in the inference library 210.
The inference library 210 is configured to execute an input deep learning algorithm model by using a support layer already covered by the inference library 210 and a registered private layer, so as to infer an input image and obtain an inference result; and calling the private layer interface whenever the executed layer is the registered private layer, and executing the execution logic of which the executed private layer is defined.
By adopting the embodiment, the private layer interface is opened in the reasoning platform, so that the user-defined model can be registered in the reasoning library according to different application scenes, and the model algorithm comprising the customized private layer is realized by a method of calling the private layer interface, so that one reasoning platform can complete reasoning of various different deep learning models with user-defined private layers, and the corresponding reasoning library is not required to be developed for different application scenes, thereby improving the development efficiency, reducing the development labor cost, improving the application development flexibility and realizing the device opening.
The representation of the layer information acquired by the private layer interface 220 may be different according to the application scenario, and in some possible embodiments, in order to unify the representation of the layer information, the private layer information acquired by the private layer interface 220 is the same as the representation of the layer information of the layer registered in the inference library 210 when the inference library 210 is created. In one possible embodiment, a private layer file input by a user through a preset user terminal may be read, for example, private_layer.c (a private layer file written in c or c++) or private_layer.py (a private layer file written in python language), and the private layer file may also be written in other computer languages according to application scenarios, so as to obtain layer information of the private layer.
The inference library 210 is divided into two cases when executing the algorithm employed by the input deep learning model. Assuming that the algorithm executed is already included in the inference library 210 when the inference library 210 is created, the inference library 210 has layer information of the algorithm registered therein, and the inference library 210 may implement the algorithm according to an implementation represented by the layer information of the algorithm. Assuming that the algorithm being executed is not registered in the inference library 210 at the time of the inference library 210 creation, i.e., the algorithm is a private layer registered in the inference library through a private layer interface, the inference library 210 may call the private layer interface 220. The private layer interface 220 may be invoked when the inference library 210 resolves to a private layer in the deep learning model.
The private layer interface 220 acquires layer information of the private layer in advance, so that the private layer can be implemented based on the layer information of the private layer when called by the inference library 210. When the inference library 210 parses the private layer in the deep learning model, the private layer interface 220 is invoked to determine the memory required to acquire the private layer model. The private layer interface 220 applies for the corresponding memory. The inference library 210 allocates the corresponding model memory for the private layer and invokes the private layer interface 220 to create the private layer model. Similarly, inference library 210 invokes private layer interface 220 to calculate the memory required for the algorithm employed to create the private layer model. The inference library 210 allocates a corresponding algorithm memory for the private layer 220 and invokes the private layer interface 220 to create an instance of the algorithm, which is executed to infer the input of the private layer 220, resulting in the output of the private layer. According to the difference of the positions of the private layers in the deep learning model, the input of the private layers can be the feature map of the image to be processed, and can also be the calculation result of the output of the last layer of the private layers in the deep learning model.
In one possible embodiment, the private layer interface 220 may also be used to obtain custom parameters that are used to represent the manner in which the private layer executes. The private layer interface can be specifically used for executing the execution logic of the private layer defined executed by the inference library according to the configuration form of the user-defined parameters based on the layer information of the private layer when the private layer interface is called by the inference library. It will be appreciated that the same execution logic may be executed and implemented in a plurality of different manners, which may achieve different technical effects, respectively, and may be required to achieve different technical effects in different application scenarios. Therefore, by adopting the embodiment, the user can deeply customize the private layer in the deep learning model through the private layer interface of the reasoning platform, so that the obtained reasoning result can better meet the actual demands of the user
In different application scenarios, the custom parameters may be used to represent different meanings, for example, in one possible embodiment, the custom parameters are used to configure system resources occupied by execution logic defined by an execution private layer, and the private layer interface 220 is specifically used to invoke the system resources represented by the custom parameters, execute the execution logic defined by the private layer executed by the inference library.
By way of example, the custom parameters may be specifically used to configure how much memory is occupied by the model and/or algorithm used by the custom layer. Taking image recognition as an example, in some application scenarios, the computing load of the electronic device performing image recognition may be larger, so that the system resource occupied by the execution logic for executing the private layer is reduced by adjusting the custom parameter, so as to avoid the electronic device from being blocked due to excessive computing load.
In other application scenarios, the computing load of the electronic device performing image recognition may be low, so that the system resources occupied by the execution logic for executing the private layer is increased by adjusting the custom parameters, so that the computing resources are fully utilized, and the efficiency of image recognition is improved.
For another example, in one possible embodiment, the custom parameters are used to represent a calculation manner of implementing the private layer-defined execution logic, and the private layer interface 220 is specifically used to calculate according to the calculation manner represented by the custom parameters, so as to execute the private layer-defined execution logic executed by the inference library.
The configuration mode of the calculation mode can be different according to different application scenarios, and the custom parameters can be exemplified by configuring one or more parameters of the following parameters:
the model used by the custom layer, the algorithm used by the custom layer, the computational logic for forward execution computation by the custom layer, and the size of the output of the custom layer.
Wherein the model may be represented in the form of a handle of the model, the algorithm may be represented in the form of a handle of the algorithm, and the size of the output may be represented by a parameter of reshape (a function for adjusting the size).
Taking image recognition as an example, in some application scenarios, in order to improve the accuracy of image recognition, the execution logic of the custom layer may be implemented by using a calculation mode with higher algorithm complexity and higher calculation precision, and in other application scenarios, in order to improve the efficiency of image recognition, the execution logic of the custom layer may be implemented by using a calculation mode with lower algorithm complexity. Therefore, different technical effects can be achieved by adopting different calculation modes to realize the execution logic defined by the custom layer.
Referring to fig. 3, fig. 3 is a schematic flow chart of an inference method provided by an embodiment of the present application, which may be applied to a private layer interface in an inference platform, the method may include:
s301, layer information of a private layer is acquired.
S302, defining execution logic of the private layer according to the private layer information, and registering the private layer in the reasoning library so that the reasoning library calls the private layer interface when executing the private layer.
S303, executing the execution logic defined by the private layer when being called by the reasoning library.
By adopting the embodiment, the private layer interface is opened in the reasoning platform, so that the user-defined model can be registered in the reasoning library according to different application scenes, and the model algorithm comprising the customized private layer is realized by a method of calling the private layer interface, so that one reasoning platform can complete reasoning of various different deep learning models with user-defined private layers, and the corresponding reasoning library is not required to be developed for different application scenes, thereby improving the development efficiency, reducing the development labor cost, improving the application development flexibility and realizing the device opening.
For the layer information in S301, reference may be made to the foregoing description about the private layer interface, which is not repeated here.
In a possible embodiment, the implementation flow of the private layer in S302 may be shown in fig. 4, including:
s401, the private layer interface obtains the memory required by the private layer model.
S402, the private layer creates a private layer model.
S403, the private layer interface acquires the memory required by the algorithm adopted by the private layer model.
S404, the private layer interface creates an algorithm adopted by the private layer model.
S405, the private layer interface acquires the custom parameters.
S406, configuring the created algorithm by the private layer interface according to the mode represented by the user-defined parameters.
S407, executing the configured algorithm by the private layer interface to process the input of the private layer, and obtaining the output of the private layer.
S408, a private layer interface release algorithm.
S409, the private layer interface releases the model.
It can be understood that fig. 4 is only a schematic diagram of the implementation flow of the private layer provided by the embodiment of the present application, as described above, in different application scenarios, the meaning represented by the custom parameter may be different, so the execution sequence between S405 and other steps may be different from that shown in fig. 4. Illustratively, S405 may be performed prior to any of steps S401-S404, which is not limited in this embodiment.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an inference apparatus provided by an embodiment of the present application, where the apparatus is applied to a private layer interface of an inference platform as described in any one of the foregoing, and the apparatus includes:
a layer information obtaining module 501, configured to obtain layer information of a private layer, where the layer information is used to represent an implementation manner of the private layer, so that the inference library invokes the private layer interface every time the private layer is executed;
a private layer definition module 502, configured to define execution logic of the private layer according to the layer information; registering the private layer in an inference library, so that the inference library calls the private layer interface when executing the private layer;
an algorithm implementation module 503 is configured to execute the execution logic defined by the private layer when called by the inference library.
In a possible embodiment, the apparatus further includes a parameter acquisition module configured to acquire a custom parameter;
the algorithm implementation module 503 is specifically configured to execute the execution logic defined by the private layer according to the configuration form of the custom parameter.
In a possible embodiment, the custom parameter is used to configure system resources occupied by execution force logic that executes the private layer defined, and the algorithm implementation module 503 is specifically used to invoke the system resources configured by the custom parameter to execute the execution logic that executes the private layer defined by the inference library.
In a possible embodiment, the custom parameter is used to configure a calculation mode for implementing the private layer defined execution logic, and the algorithm implementing module 503 is specifically configured to perform calculation according to the calculation mode configured by the custom parameter, so as to execute the private layer defined execution logic executed by the inference library.
The embodiment of the application also provides an electronic device, as shown in fig. 6, including:
a memory 601 for storing a computer program;
a processor 602, configured to execute a program stored in the memory 601, and implement the following steps:
acquiring layer information of a private layer;
defining execution logic of the private layer according to the layer information; registering the private layer in an inference library, so that the inference library calls the private layer interface when executing the private layer;
executing the execution logic defined by the private layer when called by the inference library.
In one possible embodiment, the method further comprises:
obtaining a custom parameter;
the executing the execution logic defined by the private layer comprises:
executing the execution logic defined by the private layer according to the form configured by the custom parameters.
In a possible embodiment, the custom parameter is used to configure system resources occupied by execution private layer defined execution force logic, and the execution private layer defined execution logic executed by the inference library is executed according to the form configured by the custom parameter, including:
and calling the system resource configured by the custom parameters, and executing the execution logic of which the private layer is defined and executed by the reasoning library.
In a possible embodiment, the custom parameters are used to configure a computing manner of implementing private layer defined execution logic, and the executing the private layer defined execution logic executed by the inference library according to the form configured by the custom parameters includes:
and calculating according to a calculation mode configured by the custom parameters so as to execute the execution logic of which the private layer is defined and executed by the reasoning library.
The Memory mentioned in the electronic device may include a random access Memory (Random Access Memory, RAM) or may include a Non-Volatile Memory (NVM), such as at least one magnetic disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The above-described inference platform may also be referred to as an inference system, comprising a private layer interface and an inference library. Model reasoning of different application scenes is achieved. Such as face recognition models, vehicle recognition models, speech recognition models, foreground recognition models, motion recognition models, attribute classification models, etc.
In yet another embodiment of the present application, a computer-readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform any of the inference methods of the above embodiments is also provided.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the inference methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, the description is relatively simple, as relevant to the method embodiments being referred to in the section of the description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the 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 (6)

1. An inference platform is characterized by comprising an inference library and a private layer interface;
the private layer interface is used for acquiring layer information of a private layer; defining execution logic of the private layer according to the layer information of the private layer; registering the private layer in the reasoning library; the private layer is a layer customized according to the user requirements;
the inference library is used for executing an input deep learning algorithm model by utilizing the support layer and the registered private layer so as to infer an input image and obtain an inference result; calling the private layer interface whenever the executed layer is a registered private layer, and executing the execution logic of the executed private layer defined; the supporting layer is a layer already covered in the reasoning library;
the private layer interface is also used for acquiring the self-defined parameters; executing the execution logic of which the private layer is defined and executed by the reasoning library according to the form configured by the custom parameters when being called by the reasoning library;
the self-defined parameters are used for configuring system resources occupied by execution logic for executing the private layer definition, and the private layer interface is specifically used for calling the system resources configured by the self-defined parameters and executing the execution logic for executing the private layer definition executed by the reasoning library.
2. The inference platform of claim 1, wherein the inference library is specifically configured to execute an input deep learning algorithm model for image recognition by using a supporting layer already covered by the inference library and a private layer already registered, so as to recognize an input image, and obtain a recognition result.
3. The inference platform of claim 1, wherein the custom parameters are used for configuring a calculation mode for implementing the private layer defined execution logic, and the private layer interface is specifically used for calculating according to the calculation mode configured by the custom parameters, so as to execute the private layer defined execution logic executed by the inference library.
4. A method of reasoning, characterized in that the method is applied to a private layer interface of a reasoning platform as claimed in any of claims 1-3, the method comprising:
acquiring layer information of a private layer, wherein the private layer is a layer customized according to user requirements;
defining execution logic of the private layer according to the layer information; registering the private layer in an inference library, so that the inference library calls the private layer interface when executing the private layer;
executing the execution logic defined by the private layer when called by the inference library;
the method further comprises the steps of:
obtaining a custom parameter;
the executing the execution logic defined by the private layer comprises:
executing the execution logic defined by the private layer according to the form configured by the custom parameters;
the custom parameters are used for configuring system resources occupied by execution logic for executing the private layer definition, and the execution logic for executing the private layer definition executed by the reasoning base according to the form configured by the custom parameters comprises the following steps:
and calling the system resource configured by the custom parameters, and executing the execution logic of which the private layer is defined and executed by the reasoning library.
5. The method of claim 4, wherein the custom parameters are used to configure a computing manner of implementing private layer-defined execution logic, and wherein executing the private layer-defined execution logic executed by the inference library in the form configured by the custom parameters comprises:
and calculating according to a calculation mode configured by the custom parameters so as to execute the execution logic of which the private layer is defined and executed by the reasoning library.
6. An inference apparatus, characterized in that the apparatus is applied to a private layer interface of an inference platform as claimed in any of claims 1-3, the apparatus comprising:
the layer information acquisition module is used for acquiring layer information of a private layer, wherein the private layer is a layer customized according to user requirements;
the private layer definition module is used for defining execution logic of the private layer according to the layer information; registering the private layer in an inference library, so that the inference library calls the private layer interface when executing the private layer;
the algorithm implementation module is used for executing the execution logic defined by the private layer when being called by the reasoning library;
the apparatus further comprises:
the acquisition module is used for acquiring the self-defined parameters;
the algorithm implementation module executes execution logic defined by the private layer, including:
executing the execution logic defined by the private layer according to the form configured by the custom parameters;
the custom parameters are used for configuring system resources occupied by execution logic for executing the private layer definition, and the execution logic for executing the private layer definition executed by the reasoning base according to the form configured by the custom parameters comprises the following steps:
and calling the system resource configured by the custom parameters, and executing the execution logic of which the private layer is defined and executed by the reasoning library.
CN202010247286.9A 2020-03-31 2020-03-31 Reasoning platform, method and device Active CN113469364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247286.9A CN113469364B (en) 2020-03-31 2020-03-31 Reasoning platform, method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247286.9A CN113469364B (en) 2020-03-31 2020-03-31 Reasoning platform, method and device

Publications (2)

Publication Number Publication Date
CN113469364A CN113469364A (en) 2021-10-01
CN113469364B true CN113469364B (en) 2023-10-13

Family

ID=77865736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247286.9A Active CN113469364B (en) 2020-03-31 2020-03-31 Reasoning platform, method and device

Country Status (1)

Country Link
CN (1) CN113469364B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016154440A1 (en) * 2015-03-24 2016-09-29 Hrl Laboratories, Llc Sparse inference modules for deep learning
CN106294899A (en) * 2015-05-26 2017-01-04 中国电力科学研究院 The self-defined emulation mode of power system customer based on object-oriented program framework
CN107766940A (en) * 2017-11-20 2018-03-06 北京百度网讯科技有限公司 Method and apparatus for generation model
CN108335300A (en) * 2018-06-22 2018-07-27 北京工商大学 A kind of food hyperspectral information analysis system and method based on CNN
US10210860B1 (en) * 2018-07-27 2019-02-19 Deepgram, Inc. Augmented generalized deep learning with special vocabulary

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10713594B2 (en) * 2015-03-20 2020-07-14 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing machine learning model training and deployment with a rollback mechanism
US20190171950A1 (en) * 2019-02-10 2019-06-06 Kumar Srivastava Method and system for auto learning, artificial intelligence (ai) applications development, operationalization and execution

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016154440A1 (en) * 2015-03-24 2016-09-29 Hrl Laboratories, Llc Sparse inference modules for deep learning
CN106294899A (en) * 2015-05-26 2017-01-04 中国电力科学研究院 The self-defined emulation mode of power system customer based on object-oriented program framework
CN107766940A (en) * 2017-11-20 2018-03-06 北京百度网讯科技有限公司 Method and apparatus for generation model
CN108335300A (en) * 2018-06-22 2018-07-27 北京工商大学 A kind of food hyperspectral information analysis system and method based on CNN
US10210860B1 (en) * 2018-07-27 2019-02-19 Deepgram, Inc. Augmented generalized deep learning with special vocabulary

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Framework for Customized, Machine Learning Driven Condition Monitoring System for Manufacturing;Marcin Hinz等;Procedia Manufacturing;第39卷;243-250 *
面向农业物联网多环境信息融合的监测判别研究;刘倩等;中国优秀硕士学位论文全文数据库信息科技辑(第6期);I136-437 *

Also Published As

Publication number Publication date
CN113469364A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
US20190108067A1 (en) Decomposing monolithic application into microservices
CN108958736B (en) Page generation method and device, electronic equipment and computer readable medium
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
US10699055B2 (en) Generative adversarial networks for generating physical design layout patterns
US10216834B2 (en) Accurate relationship extraction with word embeddings using minimal training data
CN110516678B (en) Image processing method and device
CN110555550B (en) Online prediction service deployment method, device and equipment
CN110162338B (en) Operation method, device and related product
US11699073B2 (en) Network off-line model processing method, artificial intelligence processing device and related products
WO2023050745A1 (en) Image processing method and apparatus, device, medium, and program
US10606975B2 (en) Coordinates-based generative adversarial networks for generating synthetic physical design layout patterns
CN110737528A (en) Method and system for reducing computational cost of executing machine learning tasks
CN115964646A (en) Heterogeneous graph generation for application microservices
US11025500B2 (en) Provisioning infrastructure from visual diagrams
CN112906554B (en) Model training optimization method and device based on visual image and related equipment
CN113469364B (en) Reasoning platform, method and device
CN112527416A (en) Task processing method and device, computer equipment and storage medium
US20200279152A1 (en) Lexicographic deep reinforcement learning using state constraints and conditional policies
CN114035804A (en) Code conversion method, device, medium and electronic equipment
CN112230911B (en) Model deployment method, device, computer equipment and storage medium
CN110222777B (en) Image feature processing method and device, electronic equipment and storage medium
CN109150993B (en) Method for obtaining network request tangent plane, terminal device and storage medium
CN113052942A (en) Chart generation method and device, storage medium and electronic equipment
CN111078230A (en) Code generation method and device
CN115762515B (en) Processing and application method, device and equipment for neural network for voice recognition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant