WO2021259039A1 - Neural network model customization method, system and device, and storage medium - Google Patents

Neural network model customization method, system and device, and storage medium Download PDF

Info

Publication number
WO2021259039A1
WO2021259039A1 PCT/CN2021/098288 CN2021098288W WO2021259039A1 WO 2021259039 A1 WO2021259039 A1 WO 2021259039A1 CN 2021098288 W CN2021098288 W CN 2021098288W WO 2021259039 A1 WO2021259039 A1 WO 2021259039A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
calculation
node
neural network
calculation graph
Prior art date
Application number
PCT/CN2021/098288
Other languages
French (fr)
Chinese (zh)
Inventor
熊超
蔡权雄
牛昕宇
Original Assignee
深圳鲲云信息科技有限公司
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
Priority claimed from CN202010575490.3A external-priority patent/CN111753983B/en
Application filed by 深圳鲲云信息科技有限公司 filed Critical 深圳鲲云信息科技有限公司
Publication of WO2021259039A1 publication Critical patent/WO2021259039A1/en

Links

Images

Classifications

    • 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

Definitions

  • This application relates to the field of neural network technology, for example, to a method, system, device, and storage medium for customizing a neural network model.
  • the deep learning neural network is realized through the data flow calculation graph.
  • the data (tensor, etc.) flows from the input node through the collection nodes, and finally the inference result is obtained at the output node.
  • Different frameworks implement data flow calculation graphs in different ways. Some use static calculation graphs, and some are dynamically created during operation. Either way, the structure calculation diagram and weights of a neural network model will eventually be obtained.
  • Different frameworks have their own model deployment methods. For artificial intelligence chip manufacturers, how to analyze and deploy multiple deep learning frameworks more easily is a key issue in their development chip tool chain. For the conversion of different deep learning frameworks, it is usually necessary to analyze the neural network models of different frameworks, generate a specific intermediate representation (Intermediate Representation), customize the intermediate representation and deploy it to the hardware device.
  • This application provides a method, system, equipment, and storage medium for customizing a neural network model to realize the generation of a custom neural network model to be suitable for different deep learning frameworks.
  • a method for customizing a neural network model which includes:
  • Obtain a preset neural network model convert the neural network model into a static calculation graph model; construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model; pass the preset
  • the graph analysis engine converts the directed acyclic calculation graph model into an intermediate expression calculation graph; and generates a customized target neural network model according to the intermediate expression calculation graph.
  • a customized system of neural network model is also provided, which includes:
  • the model acquisition module is set to obtain a preset neural network model; the model conversion module is set to convert the neural network model into a static calculation graph model; the model construction module is set to perform the first calculation according to the static calculation graph model
  • the node information of the nodes constructs a directed acyclic calculation graph model; the calculation graph conversion module is configured to convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine; the model generation module is set To generate a customized target neural network model according to the intermediate expression calculation graph.
  • a customized device for a neural network model includes: one or more processors; a storage device configured to store one or more programs. Execution by each processor, so that the one or more processors implement the above-mentioned customized method of the neural network model.
  • a computer-readable storage medium is also provided, on which a computer program is stored, and when the program is executed by a processor, the method for customizing the above-mentioned neural network model is realized.
  • FIG. 1 is a schematic flowchart of a method for customizing a neural network model provided in Embodiment 1 of the present application;
  • FIG. 2 is a schematic flowchart of a method for customizing a neural network model provided in Embodiment 2 of the present application;
  • FIG. 3 is a schematic flowchart of step S230 in FIG. 2 according to the second embodiment of the present application;
  • FIG. 4 is a schematic flowchart of step S260 in FIG. 2 according to the second embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a customized system for a neural network model provided in Embodiment 3 of the present application.
  • Fig. 6 is a schematic structural diagram of a neural network model customized device provided in the fourth embodiment of the present application.
  • first”, “second”, etc. may be used herein to describe various directions, actions, steps or elements, etc., but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element.
  • the first computing node may be referred to as the second computing node, and similarly, the second computing node may be referred to as the first computing node.
  • Both the first computing node and the second computing node are computing nodes, but they are not the same computing node.
  • the terms “first”, “second”, etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of the features.
  • "a plurality of” means at least two, such as two, three, etc., unless otherwise defined.
  • Embodiment 1 of the present application provides a method for customizing a neural network model, which includes:
  • the static computational graph model is a pre-defined computational graph model that cannot be modified during the inference process.
  • the static computational graph model can be a data flow-based programming that removes the training-related data and retains only the inference-related data.
  • the symbolic mathematics system (tensorflow) static calculation graph model can also be the open source Python machine learning library (pyotrch) static calculation graph model exported using pyotrch's official deployment tool (jit).
  • S140 Convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine.
  • the node information includes operators, operator attributes, model parameters, and edge relations, etc., where the operator In order to complete a kind of operation node, such as the node that completes addition, subtraction, multiplication and division, the large operator can be a combination of multiple mathematical operations, such as convolution operation and pooling operation; the attribute of the operator means that some operator nodes need to be specified Some parameters of the convolution operation, such as the kernel size (kernel_size) and stride length (strides), etc.; model parameters refer to the trainable parameters of the neural network model during training; the edge relationship refers to the input of the operator node The output relationship, the output of the predecessor node is the input of the node, which is generally represented by a string.
  • kernel size kernel size
  • stride length stride length
  • a preset tool is used to perform node mapping, corresponding to new nodes, adding node information, and adding edge relationships, thereby constructing a directed acyclic computing graph model.
  • the directed acyclic calculation graph model is obtained, multiple analysis rules are predefined in the preset graph analysis engine according to user needs, and these analysis rules are repeatedly iterated to match, write and replace the directed acyclic calculation graph model. Thereby converted into an intermediate expression calculation graph. After obtaining the intermediate expression calculation graph, you can easily generate a customized target neural network model through the preset interface.
  • the embodiment of the application obtains a preset neural network model; converts the neural network model into a static calculation graph model; constructs a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model Convert the directed acyclic calculation graph model into an intermediate expression calculation graph through the preset graph analysis engine; generate a customized target neural network model according to the intermediate expression calculation graph, which solves the problem that the analytical front-end is not conducive to expansion and maintenance
  • the problem of high cost realizes the effect of generating customized neural network models to apply to different deep learning frameworks.
  • the second embodiment of the present application provides a method for customizing a neural network model.
  • the second embodiment of the present application is described on the basis of the first embodiment of the present application.
  • the method includes:
  • S230 Construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model.
  • S240 Visually display the directed acyclic calculation graph model through a preset interface.
  • the user can visualize the directed acyclic calculation graph model in the browser through the Application Programming Interface (API), and check the directed acyclic calculation graph through visualization Whether the node mapping of the model is correct, so as to receive the user's modification of the directed acyclic computational graph model.
  • API Application Programming Interface
  • S260 Convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine.
  • the intermediate expression calculation graph can be converted into a customized intermediate expression through a preset serialization interface, and the intermediate expression is serialized into a customized target neural network model, thereby Completed the conversion of the preset neural network model into a customized target neural network model. Users can simply complete the neural network model extension to different deep learning frameworks, and it is easy to maintain.
  • step S230 in the embodiment of the present application includes:
  • the process of constructing the directed acyclic calculation graph model first obtain the node information of the first calculation node of the static calculation graph model, and use the python dictionary class to temporarily save the node information.
  • the node information is in addition to operators, Operator attributes, model parameters and edge relations, as well as the number of calculation nodes and the order of calculation nodes.
  • the number of calculation nodes includes the number of operators and the number of constant nodes.
  • the order of calculation nodes is each first calculation node in the dictionary record of python. The successor node.
  • the second calculation node after obtaining the number of computing nodes, initialize the same number of second computing nodes as the number of computing nodes, that is, add the same number of second computing nodes as the number of computing nodes, and then correspond the node information one-to-one according to the topological ordering
  • Add to the second calculation node add the operator name, operator attributes, model parameters, input and output and other node information for the second calculation node, thereby performing a one-to-one mapping of the original static calculation graph model to construct An undirected computational graph model with the same graph structure as the original static computational graph model.
  • S234 Add an edge relationship to the second computing node of the undirected computing graph model according to the sequence of computing nodes to construct a directed acyclic computing graph model.
  • the second computing node of the undirected computing graph model can add edge relationships one by one for each edge based on this information. For example, according to the order of computing nodes Obtain the successor nodes of node a of the first computing node including node b and node c, then correspondingly add two edges ab and ac to node a of the second computing node, and add all the edge relationships to construct a directed acyclic Computational graph model.
  • step S260 in the embodiment of the present application includes:
  • parsing rules defined in a preset graph parsing engine, where the parsing rules include matching rules, rewriting rules, and assignment rules.
  • the parsing rules can be pre-defined and stored in the graph parsing engine according to customized requirements.
  • the rules include matching rules, rewriting rules and assignment rules.
  • S262 Match the third computing node of the directed acyclic computing graph model according to the matching rule.
  • the third calculation node of the directed acyclic calculation graph model is a calculation node obtained by adding an edge relationship to the second calculation node of the undirected calculation graph model.
  • S264 Assign a value to the fourth computing node according to the assignment rule and the third computing node that is successfully matched, and delete the third computing node that is successfully matched to obtain an intermediate expression calculation graph.
  • parsing rules there are multiple parsing rules.
  • One parsing rule can be iterated first, and the third computing node of the directed acyclic computing graph model is matched according to the matching rule in the parsing rule, and the special attributes of the third computing node are matched. , Or match the topological connection relationship of the subgraph.
  • the matching is successful, the graphical structure of the fourth computing node is determined according to the rewriting rule in the analysis rule, and then the node connection relationship between the fourth computing node and the fourth computing node is added. Finally, the fourth computing node is assigned according to the assignment rule in the parsing rule and the successfully matched third computing node.
  • the fourth computing node performs the assignment, and the third computing node that successfully matches is deleted. Continue to iterate the next parsing rule until the iteration of all parsing rules is completed, thereby generating an intermediate expression calculation graph according to the obtained fourth calculation node.
  • the embodiment of the application obtains the node information of the first computing node of the static computing graph model.
  • the node information includes the number of computing nodes and the sequence of computing nodes; initializes the same number of second computing nodes as the number of computing nodes; and corresponds the node information according to the topological ordering
  • Add to the second calculation node to construct an undirected calculation graph model add edge relations to the second calculation node of the undirected calculation graph model according to the order of the calculation nodes to construct a directed acyclic calculation graph model, and obtain the definition in the preset
  • the analysis rules of the graph analysis engine the analysis rules include matching rules, rewriting rules and assignment rules; according to the matching rules, the third computing node of the directed acyclic computing graph model is matched; when the matching is successful, the fourth is added according to the rewriting rules
  • the node connection relationship between the computing node and the fourth computing node; the fourth computing node is assigned according to the assignment rules and the successfully matched third computing node, and the successfully matched third
  • the third embodiment of the present application provides a neural network model customization system 100.
  • the neural network model customization system 100 provided in the third embodiment of the present application can execute the system 100 provided by any embodiment of the present application.
  • the customized method of the neural network model has the corresponding functional modules and effects of the execution method.
  • the neural network model customization system 100 includes a model acquisition module 200, a model conversion module 300, a model construction module 400, a calculation graph conversion module 500, and a model generation module 600.
  • the model obtaining module 200 is set to obtain a preset neural network model; the model conversion module 300 is set to convert the neural network model into a static calculation graph model; the model building module 400 is set to obtain node information of the first calculation node of the static calculation graph model A directed acyclic calculation graph model is constructed; the calculation graph conversion module 500 is set to convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine; the model generation module 600 is set to calculate the graph based on the intermediate expression Generate customized target neural network model.
  • the model building module 400 is configured to obtain node information, where the node information includes the number of computing nodes and the sequence of computing nodes; an undirected computing graph model is constructed according to the number of computing nodes; an undirected computing graph model is constructed according to the sequence of computing nodes The second computing node of add edge relationship to construct a directed acyclic computing graph model.
  • the model building module 400 is configured to construct an undirected computing graph model according to the number of computing nodes in the following manner: initialize the same number of second computing nodes as the number of computing nodes; sort the operator names and operators included in the node information according to the topological order The attributes, model parameters, inputs, and outputs are correspondingly added to the same number of second calculation nodes as the number of calculation nodes to construct an undirected calculation graph model.
  • the neural network model customization system 100 further includes a model display module 700, which is configured to visually display the directed acyclic calculation graph model through a preset interface; and receive the user's modification of the directed acyclic calculation graph model.
  • a model display module 700 which is configured to visually display the directed acyclic calculation graph model through a preset interface; and receive the user's modification of the directed acyclic calculation graph model.
  • the calculation graph conversion module 500 is configured to obtain the analysis rules defined in the preset graph analysis engine; replace the third calculation node of the directed acyclic calculation graph model according to the analysis rules to obtain the intermediate expression calculation graph, wherein, the third calculation node of the directed acyclic calculation graph model is a calculation node obtained by adding the edge relationship to the second calculation node of the undirected calculation graph model.
  • the parsing rules include matching rules, rewriting rules, and assignment rules.
  • the calculation graph conversion module 500 is configured to replace the third calculation node of the directed acyclic calculation graph model according to the parsing rules in the following manner to obtain the intermediate expression calculation graph: according to the matching rules Match the third computing node of the directed acyclic computing graph model; when the third computing node is successfully matched, the node connection relationship between the fourth computing node and the fourth computing node is added according to the rewriting rule; according to the assignment rule and the matching success
  • the third computing node assigns a value to the fourth computing node, and deletes the third computing node that is successfully matched to obtain an intermediate expression calculation graph.
  • the model generation module 600 is configured to convert the intermediate expression calculation graph into a customized intermediate expression through a preset serialization interface; serialize the intermediate expression into a customized target neural network model.
  • FIG. 6 is a schematic structural diagram of a neural network model customized device provided in the fourth embodiment of the present application.
  • FIG. 6 shows a block diagram of an exemplary computer device 12 suitable for implementing the embodiments of the present application.
  • the computer device 12 shown in FIG. 6 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
  • the computer device 12 is represented in the form of a general-purpose computing device.
  • the components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
  • the bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures.
  • these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
  • the computer device 12 includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and nonvolatile media, removable and non-removable media.
  • the system memory 28 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 30 and/or a cache memory 32.
  • the computer device 12 may include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • the storage system 34 may be configured to read and write a non-removable, non-volatile magnetic medium (not shown in FIG. 6, usually referred to as a "hard drive").
  • a disk drive configured to read and write to a removable non-volatile disk (such as a "floppy disk"), and a removable non-volatile optical disk (such as a compact disc read-only memory (Compact Disc)) can be provided.
  • a removable non-volatile disk such as a "floppy disk”
  • a removable non-volatile optical disk such as a compact disc read-only memory (Compact Disc)
  • the memory 28 may include at least one program product having a set of (for example, at least one) program modules, and these program modules are configured to perform the functions of the embodiments of the present application.
  • a program/utility tool 40 having a set of (at least one) program module 42 may be stored in, for example, the memory 28.
  • Such program module 42 includes, but is not limited to, an operating system, one or more application programs, and other programs Modules and program data, each of these examples or a combination may include the realization of a network environment.
  • the program module 42 usually executes the functions and/or methods in the embodiments described in this application.
  • the computer device 12 can also communicate with one or more external devices 14 (such as keyboards, pointing devices, displays 24, etc.), and can also communicate with one or more devices that enable users to interact with the computer device 12, and/or communicate with Any device (such as a network card, modem, etc.) that enables the computer device 12 to communicate with one or more other computing devices. This communication can be performed through an input/output (Input/Output, I/O) interface 22.
  • the computer device 12 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the computer device 12 through the bus 18.
  • LAN local area network
  • WAN wide area network
  • public network such as the Internet
  • the processing unit 16 executes a variety of functional applications and data processing by running programs stored in the system memory 28, for example, to implement the methods provided in the embodiments of the present application:
  • Obtain a preset neural network model convert the neural network model into a static calculation graph model; construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model; pass the preset
  • the graph analysis engine converts the directed acyclic calculation graph model into an intermediate expression calculation graph; and generates a customized target neural network model according to the intermediate expression calculation graph.
  • the fifth embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method as provided in all the application embodiments of the present application is implemented:
  • Obtain a preset neural network model convert the neural network model into a static calculation graph model; construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model; pass the preset
  • the graph analysis engine converts the directed acyclic calculation graph model into an intermediate expression calculation graph; and generates a customized target neural network model according to the intermediate expression calculation graph.
  • the computer storage medium of the embodiment of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
  • Examples of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory, EPROM or flash memory), optical fiber, CD-ROM, optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
  • suitable medium including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
  • the computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof.
  • the programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network including LAN or WAN, or may be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A neural network model customization method, system and device, and a storage medium. The neural network model customization method comprises: acquiring a preset neural network model (S110); converting the neural network model into a static computation graph model (S120); constructing a directed cyclic computation graph model according to node information of a first computation node of the static computation graph model (S130); converting the directed cyclic computation graph model into an intermediate representation computation graph by means of a preset graph parsing engine (S140); and generating a customized target neural network model according to the intermediate representation computation graph (S150).

Description

神经网络模型的定制化方法、系统、设备和存储介质Customized method, system, equipment and storage medium of neural network model
本申请要求在2020年06月22日提交中国专利局、申请号为202010575490.3的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office with an application number of 202010575490.3 on June 22, 2020. The entire content of this application is incorporated into this application by reference.
技术领域Technical field
本申请涉及神经网络技术领域,例如涉及一种神经网络模型的定制化方法、系统、设备和存储介质。This application relates to the field of neural network technology, for example, to a method, system, device, and storage medium for customizing a neural network model.
背景技术Background technique
随着深度学习领域的进展,越来越多的企业推出自家的深度学习框架,不同的深度学习框架有着各自的优点,有的适用于研究,有的适用于工业部署等等。With the development of the field of deep learning, more and more companies have launched their own deep learning frameworks. Different deep learning frameworks have their own advantages, some are suitable for research, some are suitable for industrial deployment, and so on.
深度学习神经网络是通过数据流计算图实现的,数据(张量等)从输入节点流过一个个集选节点,最终在输出节点得到推理结果。不同的框架实现数据流计算图的方式不尽相同,有的使用静态计算图,有的在运行的过程中动态创建。但是不管哪种方式,最终都会得到一个神经网络模型的结构计算图以及权重。不同的框架有其自身的模型部署方法,而对于人工智能芯片厂商来说,如何更容易地把多种深度学习框架进行解析与部署是其开发芯片工具链的关键问题。对于不同深度学习框架的转换,通常需要针对不同框架的神经网络模型进行解析,生成一个特定的中间表达(Intermediate Representation),对中间表达进行定制优化后部署到硬件设备。The deep learning neural network is realized through the data flow calculation graph. The data (tensor, etc.) flows from the input node through the collection nodes, and finally the inference result is obtained at the output node. Different frameworks implement data flow calculation graphs in different ways. Some use static calculation graphs, and some are dynamically created during operation. Either way, the structure calculation diagram and weights of a neural network model will eventually be obtained. Different frameworks have their own model deployment methods. For artificial intelligence chip manufacturers, how to analyze and deploy multiple deep learning frameworks more easily is a key issue in their development chip tool chain. For the conversion of different deep learning frameworks, it is usually necessary to analyze the neural network models of different frameworks, generate a specific intermediate representation (Intermediate Representation), customize the intermediate representation and deploy it to the hardware device.
而不同的框架特性及模型的数据结构区别,使得开发人员需要开发多个解析前端,不同框架的前端解析模式不统一,导致前端的开发过程繁琐且效率低下,不利于扩展,且维护成本高。Different framework characteristics and data structure differences of models require developers to develop multiple analytical front ends. The front-end analytical modes of different frameworks are not uniform, resulting in cumbersome and inefficient front-end development processes, which are not conducive to expansion and high maintenance costs.
发明内容Summary of the invention
本申请提供一种神经网络模型的定制化方法、系统、设备和存储介质,以实现生成定制化的神经网络模型以适用于不同的深度学习框架。This application provides a method, system, equipment, and storage medium for customizing a neural network model to realize the generation of a custom neural network model to be suitable for different deep learning frameworks.
提供了一种神经网络模型的定制化方法,该方法包括:Provides a method for customizing a neural network model, which includes:
获取预设的神经网络模型;将所述神经网络模型转换为静态计算图模型;根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图; 根据所述中间表达计算图生成定制化的目标神经网络模型。Obtain a preset neural network model; convert the neural network model into a static calculation graph model; construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model; pass the preset The graph analysis engine converts the directed acyclic calculation graph model into an intermediate expression calculation graph; and generates a customized target neural network model according to the intermediate expression calculation graph.
还提供了一种神经网络模型的定制化系统,该系统包括:A customized system of neural network model is also provided, which includes:
模型获取模块,设置为获取预设的神经网络模型;模型转换模块,设置为将所述神经网络模型转换为静态计算图模型;模型构建模块,设置为根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;计算图转换模块,设置为通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图;模型生成模块,设置为根据所述中间表达计算图生成定制化的目标神经网络模型。The model acquisition module is set to obtain a preset neural network model; the model conversion module is set to convert the neural network model into a static calculation graph model; the model construction module is set to perform the first calculation according to the static calculation graph model The node information of the nodes constructs a directed acyclic calculation graph model; the calculation graph conversion module is configured to convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine; the model generation module is set To generate a customized target neural network model according to the intermediate expression calculation graph.
还提供了一种神经网络模型的定制化设备,该设备包括:一个或多个处理器;存储装置,设置为存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述神经网络模型的定制化方法。A customized device for a neural network model is also provided. The device includes: one or more processors; a storage device configured to store one or more programs. Execution by each processor, so that the one or more processors implement the above-mentioned customized method of the neural network model.
还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述神经网络模型的定制化方法。A computer-readable storage medium is also provided, on which a computer program is stored, and when the program is executed by a processor, the method for customizing the above-mentioned neural network model is realized.
附图说明Description of the drawings
图1是本申请实施例一提供的一种神经网络模型的定制化方法的流程示意图;FIG. 1 is a schematic flowchart of a method for customizing a neural network model provided in Embodiment 1 of the present application;
图2是本申请实施例二提供的一种神经网络模型的定制化方法的流程示意图;FIG. 2 is a schematic flowchart of a method for customizing a neural network model provided in Embodiment 2 of the present application;
图3是本申请实施例二提供的一种图2中的步骤S230的流程示意图;FIG. 3 is a schematic flowchart of step S230 in FIG. 2 according to the second embodiment of the present application;
图4是本申请实施例二提供的一种图2中的步骤S260的流程示意图;FIG. 4 is a schematic flowchart of step S260 in FIG. 2 according to the second embodiment of the present application;
图5是本申请实施例三提供的一种神经网络模型的定制化系统的结构示意图;FIG. 5 is a schematic structural diagram of a customized system for a neural network model provided in Embodiment 3 of the present application;
图6是本申请实施例四提供的一种神经网络模型的定制化设备的结构示意图。Fig. 6 is a schematic structural diagram of a neural network model customized device provided in the fourth embodiment of the present application.
具体实施方式detailed description
下面结合附图和实施例对本申请进行说明。The application will be described below with reference to the drawings and embodiments.
在讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将多个步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,多个步骤的顺序可 以被重新安排。当其操作完成时处理可以被终止,但是还可以具有未包括在附图中的附加步骤。处理可以对应于方法、函数、规程、子例程、子程序等等。It should be mentioned before discussing the exemplary embodiments that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart describes multiple steps as sequential processing, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of multiple steps can be rearranged. The processing may be terminated when its operations are completed, but may also have additional steps not included in the drawings. Processing can correspond to methods, functions, procedures, subroutines, subroutines, and so on.
此外,术语“第一”、“第二”等可在本文中用于描述多种方向、动作、步骤或元件等,但这些方向、动作、步骤或元件不受这些术语限制。这些术语仅用于将第一个方向、动作、步骤或元件与另一个方向、动作、步骤或元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一计算节点称为第二计算节点,且类似地,可将第二计算节点称为第一计算节点。第一计算节点和第二计算节点两者都是计算节点,但其不是同一计算节点。术语“第一”、“第二”等不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请实施例的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有限定。In addition, the terms "first", "second", etc. may be used herein to describe various directions, actions, steps or elements, etc., but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of the present application, the first computing node may be referred to as the second computing node, and similarly, the second computing node may be referred to as the first computing node. Both the first computing node and the second computing node are computing nodes, but they are not the same computing node. The terms "first", "second", etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise defined.
实施例一Example one
如图1所示,本申请实施例一提供了一种神经网络模型的定制化方法,该方法包括:As shown in Figure 1, Embodiment 1 of the present application provides a method for customizing a neural network model, which includes:
S110、获取预设的神经网络模型。S110. Obtain a preset neural network model.
S120、将神经网络模型转换为静态计算图模型。S120: Convert the neural network model into a static calculation graph model.
本实施例中,首先需要获取到预设的神经网络模型,即需要进行定制化的深度学习框架的神经网络模型,然后将神经网络模型转换为静态计算图模型。其中,静态计算图模型为预先定义好的、无法在推理过程中修改的计算图模型,示例性的,静态计算图模型可以为去除了训练相关数据,只保留推理相关数据的基于数据流编程的符号数学系统(tensorflow)静态计算图模型,还可以为使用pyotrch的官方部署工具(jit)导出的开源的Python机器学习库(pyotrch)静态计算图模型。In this embodiment, it is first necessary to obtain a preset neural network model, that is, a neural network model of a customized deep learning framework, and then convert the neural network model into a static computational graph model. Among them, the static computational graph model is a pre-defined computational graph model that cannot be modified during the inference process. Illustratively, the static computational graph model can be a data flow-based programming that removes the training-related data and retains only the inference-related data. The symbolic mathematics system (tensorflow) static calculation graph model can also be the open source Python machine learning library (pyotrch) static calculation graph model exported using pyotrch's official deployment tool (jit).
S130、根据静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型。S130. Construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model.
S140、通过预设的图解析引擎将有向无环计算图模型转换为中间表达计算图。S140: Convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine.
S150、根据中间表达计算图生成定制化的目标神经网络模型。S150. Generate a customized target neural network model according to the intermediate expression calculation graph.
本实施例中,获得静态计算图模型后,还需要获取到静态计算图模型的第一计算节点的节点信息,节点信息包括算子、算子属性、模型参数和边关系等, 其中,算子为完成一种运算的节点,例如完成加减乘除的节点,大的算子可以是多种数学运算的组合,例如卷积运算和池化运算;算子属性指的是部分算子节点需要指定的一些参数,如卷积运算的内核大小(kernel_size)和步长(strides)等等;模型参数指的是该神经网络模型在训练时的可训练参数;边关系指的该算子节点的输入输出关系,前继节点的输出就是该节点的输入,一般用字符串表示。然后根据第一计算节点的节点信息使用预设的工具进行节点映射,对应新增节点、添加节点信息并添加边关系,从而构建出有向无环计算图模型。在得到有向无环计算图模型后,预设的图解析引擎中根据用户需求预先定义了多个解析规则,重复迭代这些解析规则,将有向无环计算图模型进行匹配、编写和替换,从而转换为中间表达计算图。得到中间表达计算图后,就可以通过预设接口很容易的生成定制化的目标神经网络模型了。In this embodiment, after obtaining the static calculation graph model, it is also necessary to obtain the node information of the first calculation node of the static calculation graph model. The node information includes operators, operator attributes, model parameters, and edge relations, etc., where the operator In order to complete a kind of operation node, such as the node that completes addition, subtraction, multiplication and division, the large operator can be a combination of multiple mathematical operations, such as convolution operation and pooling operation; the attribute of the operator means that some operator nodes need to be specified Some parameters of the convolution operation, such as the kernel size (kernel_size) and stride length (strides), etc.; model parameters refer to the trainable parameters of the neural network model during training; the edge relationship refers to the input of the operator node The output relationship, the output of the predecessor node is the input of the node, which is generally represented by a string. Then according to the node information of the first computing node, a preset tool is used to perform node mapping, corresponding to new nodes, adding node information, and adding edge relationships, thereby constructing a directed acyclic computing graph model. After the directed acyclic calculation graph model is obtained, multiple analysis rules are predefined in the preset graph analysis engine according to user needs, and these analysis rules are repeatedly iterated to match, write and replace the directed acyclic calculation graph model. Thereby converted into an intermediate expression calculation graph. After obtaining the intermediate expression calculation graph, you can easily generate a customized target neural network model through the preset interface.
本申请实施例通过获取预设的神经网络模型;将所述神经网络模型转换为静态计算图模型;根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图;根据所述中间表达计算图生成定制化的目标神经网络模型,解决了解析前端不利于扩展且维护成本高的问题,实现了生成定制化的神经网络模型以适用于不同的深度学习框架的效果。当针对不同的深度学习框架进行解析和部署时,可以先将不同的深度学习框架对应的不同神经网络模型定制化,得到通用的模型表示方式,在此基础上对不同的深度学习框架进行部署,可以减少解析前端的数量,且利于对解析前端进行扩展,维护成本少。The embodiment of the application obtains a preset neural network model; converts the neural network model into a static calculation graph model; constructs a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model Convert the directed acyclic calculation graph model into an intermediate expression calculation graph through the preset graph analysis engine; generate a customized target neural network model according to the intermediate expression calculation graph, which solves the problem that the analytical front-end is not conducive to expansion and maintenance The problem of high cost realizes the effect of generating customized neural network models to apply to different deep learning frameworks. When analyzing and deploying different deep learning frameworks, you can first customize different neural network models corresponding to different deep learning frameworks to obtain a common model representation, and then deploy different deep learning frameworks on this basis. The number of analysis front ends can be reduced, and the analysis front ends can be expanded, and the maintenance cost is low.
实施例二Example two
如图2所示,本申请实施例二提供了一种神经网络模型的定制化方法,本申请实施例二是在本申请实施例一的基础上进行说明,该方法包括:As shown in Figure 2, the second embodiment of the present application provides a method for customizing a neural network model. The second embodiment of the present application is described on the basis of the first embodiment of the present application. The method includes:
S210、获取预设的神经网络模型。S210. Obtain a preset neural network model.
S220、将神经网络模型转换为静态计算图模型。S220: Convert the neural network model into a static calculation graph model.
S230、根据静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型。S230: Construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model.
S240、通过预设接口将有向无环计算图模型可视化显示。S240: Visually display the directed acyclic calculation graph model through a preset interface.
S250、接收用户对有向无环计算图模型的修改。S250. Receive a user's modification to the directed acyclic calculation graph model.
本实施例中,在获得有向无环计算图模型后,用户可以通过应用程序接口(Application Programming Interface,API)在浏览器可视化有向无环计算图模型,通过可视化检查有向无环计算图模型的节点的映射是否正确,以便接收用户对 有向无环计算图模型的修改。In this embodiment, after obtaining the directed acyclic calculation graph model, the user can visualize the directed acyclic calculation graph model in the browser through the Application Programming Interface (API), and check the directed acyclic calculation graph through visualization Whether the node mapping of the model is correct, so as to receive the user's modification of the directed acyclic computational graph model.
S260、通过预设的图解析引擎将有向无环计算图模型转换为中间表达计算图。S260: Convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine.
S270、通过预设的序列化接口将中间表达计算图转换为定制化的中间表达。S270: Convert the intermediate expression calculation graph into a customized intermediate expression through a preset serialization interface.
S280、将中间表达序列化为定制化的目标神经网络模型。S280. Serialize the intermediate expression into a customized target neural network model.
本实施例中,得到中间表达计算图后,可以通过预设的序列化接口将中间表达计算图转换为定制化的中间表达,并将中间表达序列化为定制化的目标神经网络模型,由此完成了将预设的神经网络模型转换为定制化的目标神经网络模型,用户可以简单地完成神经网络模型对于不同深度学习框架的扩展,且容易维护。In this embodiment, after the intermediate expression calculation graph is obtained, the intermediate expression calculation graph can be converted into a customized intermediate expression through a preset serialization interface, and the intermediate expression is serialized into a customized target neural network model, thereby Completed the conversion of the preset neural network model into a customized target neural network model. Users can simply complete the neural network model extension to different deep learning frameworks, and it is easy to maintain.
如图3所示,本申请实施例中的步骤S230包括:As shown in FIG. 3, step S230 in the embodiment of the present application includes:
S231、获取静态计算图模型的第一计算节点的节点信息,节点信息包括计算节点数量和计算节点顺序。S231. Obtain node information of the first calculation node of the static calculation graph model, where the node information includes the number of calculation nodes and the order of the calculation nodes.
本实施例中,在构建有向无环计算图模型的过程中,首先要获取静态计算图模型的第一计算节点的节点信息,使用python的字典类暂时保存节点信息,节点信息除了算子、算子属性、模型参数和边关系,还包括计算节点数量和计算节点顺序,计算节点数量包括算子的数量和常数节点的数量,计算节点顺序为python的字典类记录的每个第一计算节点的后继节点。In this embodiment, in the process of constructing the directed acyclic calculation graph model, first obtain the node information of the first calculation node of the static calculation graph model, and use the python dictionary class to temporarily save the node information. The node information is in addition to operators, Operator attributes, model parameters and edge relations, as well as the number of calculation nodes and the order of calculation nodes. The number of calculation nodes includes the number of operators and the number of constant nodes. The order of calculation nodes is each first calculation node in the dictionary record of python. The successor node.
S232、初始化与计算节点数量相同数量的第二计算节点。S232. Initialize the same number of second computing nodes as the number of computing nodes.
S233、按照拓扑排序将节点信息对应添加至第二计算节点以构建出无向计算图模型。S233. Correspondingly add node information to the second computing node according to the topological sorting to construct an undirected computing graph model.
本实施例中,获取到计算节点数量后,初始化与计算节点数量相同数量的第二计算节点,即新增与计算节点数量相同数量的第二计算节点,然后按照拓扑排序将节点信息一一对应地添加至第二计算节点,为第二计算节点添加算子名称、算子属性、模型参数、输入和输出等节点信息,由此对原始的静态计算图模型进行节点一对一地映射,构建与原始的静态计算图模型具有相同图结构的无向计算图模型。In this embodiment, after obtaining the number of computing nodes, initialize the same number of second computing nodes as the number of computing nodes, that is, add the same number of second computing nodes as the number of computing nodes, and then correspond the node information one-to-one according to the topological ordering Add to the second calculation node, add the operator name, operator attributes, model parameters, input and output and other node information for the second calculation node, thereby performing a one-to-one mapping of the original static calculation graph model to construct An undirected computational graph model with the same graph structure as the original static computational graph model.
S234、根据计算节点顺序为无向计算图模型的第二计算节点添加边关系以构建出有向无环计算图模型。S234: Add an edge relationship to the second computing node of the undirected computing graph model according to the sequence of computing nodes to construct a directed acyclic computing graph model.
本实施例中,获取到了每个第一计算节点的后继节点,就可以根据这些信息为无向计算图模型的第二计算节点按每条边逐一添加边关系,示例性的,根据计算节点顺序获取到第一计算节点的节点a的后继节点包括节点b和节点c, 那么相应的为第二计算节点的节点a添加a-b和a-c两条边,添加完所有的边关系构建出有向无环计算图模型。In this embodiment, after obtaining the successor nodes of each first computing node, the second computing node of the undirected computing graph model can add edge relationships one by one for each edge based on this information. For example, according to the order of computing nodes Obtain the successor nodes of node a of the first computing node including node b and node c, then correspondingly add two edges ab and ac to node a of the second computing node, and add all the edge relationships to construct a directed acyclic Computational graph model.
如图4所示,本申请实施例中的步骤S260包括:As shown in FIG. 4, step S260 in the embodiment of the present application includes:
S261、获取定义在预设的图解析引擎的解析规则,解析规则包括匹配规则、改写规则和赋值规则。S261. Obtain parsing rules defined in a preset graph parsing engine, where the parsing rules include matching rules, rewriting rules, and assignment rules.
本实施例中,在构建中间表达计算图的过程中,首先要获取定义在预设的图解析引擎的解析规则,解析规则可以是用户根据定制化需求预先定义存储在图解析引擎内的,解析规则包括匹配规则、改写规则和赋值规则。In this embodiment, in the process of constructing the intermediate expression calculation graph, it is first necessary to obtain the parsing rules defined in the preset graph parsing engine. The parsing rules can be pre-defined and stored in the graph parsing engine according to customized requirements. The rules include matching rules, rewriting rules and assignment rules.
S262、根据匹配规则对有向无环计算图模型的第三计算节点进行匹配。S262: Match the third computing node of the directed acyclic computing graph model according to the matching rule.
本实施例中,有向无环计算图模型的第三计算节点是为无向计算图模型的第二计算节点添加边关系后得到的计算节点。In this embodiment, the third calculation node of the directed acyclic calculation graph model is a calculation node obtained by adding an edge relationship to the second calculation node of the undirected calculation graph model.
S263、匹配成功时,根据改写规则新增第四计算节点和第四计算节点的节点连接关系。S263. When the matching is successful, a node connection relationship between the fourth computing node and the fourth computing node is added according to the rewriting rule.
S264、根据赋值规则和匹配成功的第三计算节点对第四计算节点进行赋值,并删除匹配成功的第三计算节点以得到中间表达计算图。S264: Assign a value to the fourth computing node according to the assignment rule and the third computing node that is successfully matched, and delete the third computing node that is successfully matched to obtain an intermediate expression calculation graph.
本实施例中,解析规则为多个,可以先迭代一个解析规则,根据该解析规则中的匹配规则对有向无环计算图模型的第三计算节点进行匹配,匹配第三计算节点的特殊属性,或匹配子图的拓扑连接关系。当匹配成功时,根据该解析规则中的改写规则确定第四计算节点的图解结构,然后新增第四计算节点和第四计算节点的节点连接关系。最后根据解析规则中的赋值规则和匹配成功的第三计算节点对第四计算节点进行赋值。根据赋值规则确定第三计算节点中需要保留或替换的部分,确定第三计算节点的保留或改写属性,然后根据匹配成功的第三计算节点中需要保留的部分,以及用户自定义的内容对第四计算节点进行赋值,删除匹配成功的第三计算节点。继续迭代下一个解析规则直至完成全部解析规则的迭代,由此根据得到的第四计算节点生成中间表达计算图。In this embodiment, there are multiple parsing rules. One parsing rule can be iterated first, and the third computing node of the directed acyclic computing graph model is matched according to the matching rule in the parsing rule, and the special attributes of the third computing node are matched. , Or match the topological connection relationship of the subgraph. When the matching is successful, the graphical structure of the fourth computing node is determined according to the rewriting rule in the analysis rule, and then the node connection relationship between the fourth computing node and the fourth computing node is added. Finally, the fourth computing node is assigned according to the assignment rule in the parsing rule and the successfully matched third computing node. Determine the part of the third computing node that needs to be retained or replaced according to the assignment rules, determine the retention or rewrite attribute of the third computing node, and then determine the part that needs to be retained in the third computing node that is successfully matched, and the user-defined content The fourth computing node performs the assignment, and the third computing node that successfully matches is deleted. Continue to iterate the next parsing rule until the iteration of all parsing rules is completed, thereby generating an intermediate expression calculation graph according to the obtained fourth calculation node.
本申请实施例通过获取静态计算图模型的第一计算节点的节点信息,节点信息包括计算节点数量和计算节点顺序;初始化与计算节点数量相同数量的第二计算节点;按照拓扑排序将节点信息对应添加至第二计算节点以构建出无向计算图模型;根据计算节点顺序为无向计算图模型的第二计算节点添加边关系以构建出有向无环计算图模型,以及获取定义在预设的图解析引擎的解析规则,解析规则包括匹配规则、改写规则和赋值规则;根据匹配规则对有向无环计算图模型的第三计算节点进行匹配;匹配成功时,根据改写规则新增第四计算节点和第四计算节点的节点连接关系;根据赋值规则和匹配成功的第三计算节点 对第四计算节点进行赋值,并删除匹配成功的第三计算节点以得到中间表达计算图,解决了解析前端不利于扩展且维护成本高的问题,实现了生成定制化的神经网络模型以适用于不同的深度学习框架的效果。The embodiment of the application obtains the node information of the first computing node of the static computing graph model. The node information includes the number of computing nodes and the sequence of computing nodes; initializes the same number of second computing nodes as the number of computing nodes; and corresponds the node information according to the topological ordering Add to the second calculation node to construct an undirected calculation graph model; add edge relations to the second calculation node of the undirected calculation graph model according to the order of the calculation nodes to construct a directed acyclic calculation graph model, and obtain the definition in the preset The analysis rules of the graph analysis engine, the analysis rules include matching rules, rewriting rules and assignment rules; according to the matching rules, the third computing node of the directed acyclic computing graph model is matched; when the matching is successful, the fourth is added according to the rewriting rules The node connection relationship between the computing node and the fourth computing node; the fourth computing node is assigned according to the assignment rules and the successfully matched third computing node, and the successfully matched third computing node is deleted to obtain the intermediate expression calculation graph, which solves the analysis The front-end is not conducive to the problem of expansion and high maintenance costs, and realizes the effect of generating customized neural network models to apply to different deep learning frameworks.
实施例三Example three
如图5所示,本申请实施例三提供了一种神经网络模型的定制化系统100,本申请实施例三所提供的神经网络模型的定制化系统100可执行本申请任意实施例所提供的神经网络模型的定制化方法,具备执行方法相应的功能模块和效果。该神经网络模型的定制化系统100包括模型获取模块200、模型转换模块300、模型构建模块400、计算图转换模块500和模型生成模块600。As shown in FIG. 5, the third embodiment of the present application provides a neural network model customization system 100. The neural network model customization system 100 provided in the third embodiment of the present application can execute the system 100 provided by any embodiment of the present application. The customized method of the neural network model has the corresponding functional modules and effects of the execution method. The neural network model customization system 100 includes a model acquisition module 200, a model conversion module 300, a model construction module 400, a calculation graph conversion module 500, and a model generation module 600.
模型获取模块200设置为获取预设的神经网络模型;模型转换模块300设置为将神经网络模型转换为静态计算图模型;模型构建模块400设置为根据静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;计算图转换模块500设置为通过预设的图解析引擎将有向无环计算图模型转换为中间表达计算图;模型生成模块600设置为根据中间表达计算图生成定制化的目标神经网络模型。The model obtaining module 200 is set to obtain a preset neural network model; the model conversion module 300 is set to convert the neural network model into a static calculation graph model; the model building module 400 is set to obtain node information of the first calculation node of the static calculation graph model A directed acyclic calculation graph model is constructed; the calculation graph conversion module 500 is set to convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine; the model generation module 600 is set to calculate the graph based on the intermediate expression Generate customized target neural network model.
本实施例中,模型构建模块400设置为获取节点信息,其中,节点信息包括计算节点数量和计算节点顺序;根据计算节点数量构建出无向计算图模型;根据计算节点顺序为无向计算图模型的第二计算节点添加边关系以构建出有向无环计算图模型。In this embodiment, the model building module 400 is configured to obtain node information, where the node information includes the number of computing nodes and the sequence of computing nodes; an undirected computing graph model is constructed according to the number of computing nodes; an undirected computing graph model is constructed according to the sequence of computing nodes The second computing node of add edge relationship to construct a directed acyclic computing graph model.
模型构建模块400设置为通过如下方式根据计算节点数量构建出无向计算图模型:初始化与计算节点数量相同数量的第二计算节点;按照拓扑排序将节点信息中还包括的算子名称、算子属性、模型参数、输入以及输出对应添加至与计算节点数量相同数量的第二计算节点以构建出无向计算图模型。The model building module 400 is configured to construct an undirected computing graph model according to the number of computing nodes in the following manner: initialize the same number of second computing nodes as the number of computing nodes; sort the operator names and operators included in the node information according to the topological order The attributes, model parameters, inputs, and outputs are correspondingly added to the same number of second calculation nodes as the number of calculation nodes to construct an undirected calculation graph model.
该神经网络模型的定制化系统100还包括模型显示模块700,模型显示模块700设置为通过预设接口将有向无环计算图模型可视化显示;接收用户对有向无环计算图模型的修改。The neural network model customization system 100 further includes a model display module 700, which is configured to visually display the directed acyclic calculation graph model through a preset interface; and receive the user's modification of the directed acyclic calculation graph model.
本实施例中,计算图转换模块500设置为获取定义在预设的图解析引擎的解析规则;根据解析规则对有向无环计算图模型的第三计算节点进行替换以得到中间表达计算图,其中,有向无环计算图模型的第三计算节点是为无向计算图模型的第二计算节点添加所述边关系后得到的计算节点。In this embodiment, the calculation graph conversion module 500 is configured to obtain the analysis rules defined in the preset graph analysis engine; replace the third calculation node of the directed acyclic calculation graph model according to the analysis rules to obtain the intermediate expression calculation graph, Wherein, the third calculation node of the directed acyclic calculation graph model is a calculation node obtained by adding the edge relationship to the second calculation node of the undirected calculation graph model.
解析规则包括匹配规则、改写规则和赋值规则,计算图转换模块500设置为通过如下方式根据解析规则对有向无环计算图模型的第三计算节点进行替换 以得到中间表达计算图:根据匹配规则对有向无环计算图模型的第三计算节点进行匹配;匹配第三计算节点成功时,根据改写规则新增第四计算节点和第四计算节点的节点连接关系;根据赋值规则和匹配成功的第三计算节点对第四计算节点进行赋值,并删除匹配成功的第三计算节点以得到中间表达计算图。The parsing rules include matching rules, rewriting rules, and assignment rules. The calculation graph conversion module 500 is configured to replace the third calculation node of the directed acyclic calculation graph model according to the parsing rules in the following manner to obtain the intermediate expression calculation graph: according to the matching rules Match the third computing node of the directed acyclic computing graph model; when the third computing node is successfully matched, the node connection relationship between the fourth computing node and the fourth computing node is added according to the rewriting rule; according to the assignment rule and the matching success The third computing node assigns a value to the fourth computing node, and deletes the third computing node that is successfully matched to obtain an intermediate expression calculation graph.
模型生成模块600设置为通过预设的序列化接口将中间表达计算图转换为定制化的中间表达;将中间表达序列化为定制化的目标神经网络模型。The model generation module 600 is configured to convert the intermediate expression calculation graph into a customized intermediate expression through a preset serialization interface; serialize the intermediate expression into a customized target neural network model.
实施例四Embodiment four
图6是本申请实施例四提供的一种神经网络模型的定制化设备的结构示意图。图6示出了适于用来实现本申请实施方式的示例性计算机设备12的框图。图6显示的计算机设备12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Fig. 6 is a schematic structural diagram of a neural network model customized device provided in the fourth embodiment of the present application. FIG. 6 shows a block diagram of an exemplary computer device 12 suitable for implementing the embodiments of the present application. The computer device 12 shown in FIG. 6 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
如图6所示,计算机设备12以通用计算设备的形式表现。计算机设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 6, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture,ISA)总线,微通道体系结构(Micro Channel Architecture,MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。The bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
计算机设备12包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。The computer device 12 includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and nonvolatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)30和/或高速缓存存储器32。计算机设备12可以包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以设置为读写不可移动的、非易失性磁介质(图6未显示,通常称为“硬盘驱动器”)。尽管图6中未示出,可以提供设置为对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM),数字多功能盘只读存储器(Digital Versatile Disc-ROM,DVD-ROM 或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请实施例的功能。The system memory 28 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 30 and/or a cache memory 32. The computer device 12 may include other removable/non-removable, volatile/nonvolatile computer system storage media. For example only, the storage system 34 may be configured to read and write a non-removable, non-volatile magnetic medium (not shown in FIG. 6, usually referred to as a "hard drive"). Although not shown in FIG. 6, a disk drive configured to read and write to a removable non-volatile disk (such as a "floppy disk"), and a removable non-volatile optical disk (such as a compact disc read-only memory (Compact Disc)) can be provided. Read-Only Memory, CD-ROM), Digital Versatile Disc-ROM, DVD-ROM or other optical media for reading and writing optical disc drives. In these cases, each drive can pass one or Multiple data medium interfaces are connected to the bus 18. The memory 28 may include at least one program product having a set of (for example, at least one) program modules, and these program modules are configured to perform the functions of the embodiments of the present application.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或一种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。A program/utility tool 40 having a set of (at least one) program module 42 may be stored in, for example, the memory 28. Such program module 42 includes, but is not limited to, an operating system, one or more application programs, and other programs Modules and program data, each of these examples or a combination may include the realization of a network environment. The program module 42 usually executes the functions and/or methods in the embodiments described in this application.
计算机设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该计算机设备12交互的设备通信,和/或与使得该计算机设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(Input/Output,I/O)接口22进行。并且,计算机设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与计算机设备12的其它模块通信。尽管图中未示出,可以结合计算机设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of Independent Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。The computer device 12 can also communicate with one or more external devices 14 (such as keyboards, pointing devices, displays 24, etc.), and can also communicate with one or more devices that enable users to interact with the computer device 12, and/or communicate with Any device (such as a network card, modem, etc.) that enables the computer device 12 to communicate with one or more other computing devices. This communication can be performed through an input/output (Input/Output, I/O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the computer device 12 through the bus 18. Although not shown in the figure, other hardware and/or software modules can be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, and disk arrays (Redundant Arrays of Independent Disks). , RAID) systems, tape drives, and data backup storage systems.
处理单元16通过运行存储在系统存储器28中的程序,从而执行多种功能应用以及数据处理,例如实现本申请实施例所提供的方法:The processing unit 16 executes a variety of functional applications and data processing by running programs stored in the system memory 28, for example, to implement the methods provided in the embodiments of the present application:
获取预设的神经网络模型;将所述神经网络模型转换为静态计算图模型;根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图;根据所述中间表达计算图生成定制化的目标神经网络模型。Obtain a preset neural network model; convert the neural network model into a static calculation graph model; construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model; pass the preset The graph analysis engine converts the directed acyclic calculation graph model into an intermediate expression calculation graph; and generates a customized target neural network model according to the intermediate expression calculation graph.
实施例五Embodiment five
本申请实施例五还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请所有申请实施例提供的方法:The fifth embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method as provided in all the application embodiments of the present application is implemented:
获取预设的神经网络模型;将所述神经网络模型转换为静态计算图模型;根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图; 根据所述中间表达计算图生成定制化的目标神经网络模型。Obtain a preset neural network model; convert the neural network model into a static calculation graph model; construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model; pass the preset The graph analysis engine converts the directed acyclic calculation graph model into an intermediate expression calculation graph; and generates a customized target neural network model according to the intermediate expression calculation graph.
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM或闪存)、光纤、CD-ROM、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium of the embodiment of the present application may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. Examples of computer-readable storage media (non-exhaustive list) include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory, EPROM or flash memory), optical fiber, CD-ROM, optical storage device, magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable medium may send, propagate or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof. The programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network including LAN or WAN, or may be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

Claims (10)

  1. 一种神经网络模型的定制化方法,包括:A method for customizing neural network models, including:
    获取预设的神经网络模型;Obtain a preset neural network model;
    将所述神经网络模型转换为静态计算图模型;Converting the neural network model into a static calculation graph model;
    根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;Constructing a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model;
    通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图;Converting the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine;
    根据所述中间表达计算图生成定制化的目标神经网络模型。A customized target neural network model is generated according to the intermediate expression calculation graph.
  2. 根据权利要求1所述的方法,其中,所述根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型,包括:The method according to claim 1, wherein the constructing a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model comprises:
    获取所述节点信息,其中,所述节点信息包括计算节点数量和计算节点顺序;Acquiring the node information, where the node information includes the number of computing nodes and the order of computing nodes;
    根据所述计算节点数量构建出无向计算图模型;Constructing an undirected calculation graph model according to the number of computing nodes;
    根据所述计算节点顺序为所述无向计算图模型的第二计算节点添加边关系以构建出所述有向无环计算图模型。Adding an edge relationship to the second computing node of the undirected computing graph model according to the sequence of computing nodes to construct the directed acyclic computing graph model.
  3. 根据权利要求2所述的方法,其中,所述根据所述计算节点数量构建出无向计算图模型,包括:The method according to claim 2, wherein said constructing an undirected calculation graph model according to the number of calculation nodes comprises:
    初始化与所述计算节点数量相同数量的第二计算节点;Initialize the same number of second computing nodes as the number of said computing nodes;
    按照拓扑排序将所述节点信息中还包括的算子名称、算子属性、模型参数、输入以及输出对应添加至所述与所述计算节点数量相同数量的第二计算节点以构建出所述无向计算图模型。According to the topological sorting, the operator names, operator attributes, model parameters, inputs, and outputs that are also included in the node information are correspondingly added to the second computing nodes of the same number as the number of computing nodes to construct the To the computational graph model.
  4. 根据权利要求1所述的方法,在所述根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型之后,还包括:The method according to claim 1, after constructing a directed acyclic calculation graph model based on the node information of the first calculation node of the static calculation graph model, further comprising:
    通过预设接口将所述有向无环计算图模型可视化显示;Visually display the directed acyclic calculation graph model through a preset interface;
    接收用户对所述有向无环计算图模型的修改。Receive a user's modification to the directed acyclic calculation graph model.
  5. 根据权利要求1所述的方法,其中,所述通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图,包括:The method according to claim 1, wherein the converting the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine comprises:
    获取定义在所述预设的图解析引擎的解析规则;Acquiring the parsing rules defined in the preset graph parsing engine;
    根据所述解析规则对所述有向无环计算图模型的第三计算节点进行替换以得到所述中间表达计算图,其中,所述有向无环计算图模型的第三计算节点是为所述无向计算图模型的第二计算节点添加所述边关系后得到的计算节点。The third calculation node of the directed acyclic calculation graph model is replaced according to the analysis rule to obtain the intermediate expression calculation graph, wherein the third calculation node of the directed acyclic calculation graph model is The calculation node obtained by adding the edge relationship to the second calculation node of the undirected calculation graph model.
  6. 根据权利要求5所述的方法,其中,所述解析规则包括匹配规则、改写规则和赋值规则;The method according to claim 5, wherein the parsing rules include matching rules, rewriting rules, and assignment rules;
    所述根据所述解析规则对所述有向无环计算图模型的第三计算节点进行替换以得到所述中间表达计算图,包括:The replacing the third calculation node of the directed acyclic calculation graph model according to the analysis rule to obtain the intermediate expression calculation graph includes:
    根据所述匹配规则对所述有向无环计算图模型的第三计算节点进行匹配;Matching the third computing node of the directed acyclic computing graph model according to the matching rule;
    在匹配所述第三计算节点成功的情况下,根据所述改写规则新增第四计算节点和所述第四计算节点的节点连接关系;In the case that the third computing node is successfully matched, a node connection relationship between the fourth computing node and the fourth computing node is newly added according to the rewriting rule;
    根据所述赋值规则和匹配成功的所述第三计算节点对所述第四计算节点进行赋值,并删除匹配成功的所述第三计算节点以得到所述中间表达计算图。Assign a value to the fourth computing node according to the assignment rule and the successfully matched third computing node, and delete the successfully matched third computing node to obtain the intermediate expression computing graph.
  7. 根据权利要求1所述的方法,其中,所述根据所述中间表达计算图生成定制化的目标神经网络模型,包括:The method according to claim 1, wherein the generating a customized target neural network model according to the intermediate expression calculation graph comprises:
    通过预设的序列化接口将所述中间表达计算图转换为定制化的中间表达;Converting the intermediate expression calculation graph into a customized intermediate expression through a preset serialization interface;
    将所述中间表达序列化为所述定制化的目标神经网络模型。The intermediate expression is serialized into the customized target neural network model.
  8. 一种神经网络模型的定制化系统,包括:A customized system of neural network model, including:
    模型获取模块,设置为获取预设的神经网络模型;The model acquisition module is set to acquire the preset neural network model;
    模型转换模块,设置为将所述神经网络模型转换为静态计算图模型;A model conversion module, configured to convert the neural network model into a static calculation graph model;
    模型构建模块,设置为根据所述静态计算图模型的第一计算节点的节点信息构建出有向无环计算图模型;A model construction module, configured to construct a directed acyclic calculation graph model according to the node information of the first calculation node of the static calculation graph model;
    计算图转换模块,设置为通过预设的图解析引擎将所述有向无环计算图模型转换为中间表达计算图;The calculation graph conversion module is configured to convert the directed acyclic calculation graph model into an intermediate expression calculation graph through a preset graph analysis engine;
    模型生成模块,设置为根据所述中间表达计算图生成定制化的目标神经网络模型。The model generation module is configured to generate a customized target neural network model according to the intermediate expression calculation graph.
  9. 一种神经网络模型的定制化设备,包括:A customized equipment of neural network model, including:
    至少一个处理器;At least one processor;
    存储装置,设置为存储至少一个程序;The storage device is set to store at least one program;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-7中任一项所述的神经网络模型的定制化方法。When the at least one program is executed by the at least one processor, the at least one processor implements the neural network model customization method according to any one of claims 1-7.
  10. 一种计算机可读存储介质,存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-7中任一项所述的神经网络模型的定制化方法。A computer-readable storage medium storing a computer program, wherein when the program is executed by a processor, the neural network model customization method according to any one of claims 1-7 is realized.
PCT/CN2021/098288 2020-06-22 2021-06-04 Neural network model customization method, system and device, and storage medium WO2021259039A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010575490.3A CN111753983B (en) 2020-06-22 Customization method, system, equipment and storage medium for neural network model
CN202010575490.3 2020-06-22

Publications (1)

Publication Number Publication Date
WO2021259039A1 true WO2021259039A1 (en) 2021-12-30

Family

ID=72676376

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/098288 WO2021259039A1 (en) 2020-06-22 2021-06-04 Neural network model customization method, system and device, and storage medium

Country Status (1)

Country Link
WO (1) WO2021259039A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023246177A1 (en) * 2022-06-20 2023-12-28 美的集团(上海)有限公司 Image processing method, and electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106650922A (en) * 2016-09-29 2017-05-10 清华大学 Hardware neural network conversion method, computing device, compiling method and neural network software and hardware collaboration system
WO2017152990A1 (en) * 2016-03-11 2017-09-14 Telecom Italia S.P.A. Convolutional neural networks, particularly for image analysis
CN109284815A (en) * 2018-11-30 2019-01-29 上海寒武纪信息科技有限公司 Neural network model algorithm Compilation Method, device and Related product
CN109543825A (en) * 2018-11-30 2019-03-29 上海寒武纪信息科技有限公司 Neural network model algorithm Compilation Method, device and Related product
CN111753983A (en) * 2020-06-22 2020-10-09 深圳鲲云信息科技有限公司 Method, system, device and storage medium for customizing neural network model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017152990A1 (en) * 2016-03-11 2017-09-14 Telecom Italia S.P.A. Convolutional neural networks, particularly for image analysis
CN106650922A (en) * 2016-09-29 2017-05-10 清华大学 Hardware neural network conversion method, computing device, compiling method and neural network software and hardware collaboration system
CN109284815A (en) * 2018-11-30 2019-01-29 上海寒武纪信息科技有限公司 Neural network model algorithm Compilation Method, device and Related product
CN109543825A (en) * 2018-11-30 2019-03-29 上海寒武纪信息科技有限公司 Neural network model algorithm Compilation Method, device and Related product
CN111753983A (en) * 2020-06-22 2020-10-09 深圳鲲云信息科技有限公司 Method, system, device and storage medium for customizing neural network model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023246177A1 (en) * 2022-06-20 2023-12-28 美的集团(上海)有限公司 Image processing method, and electronic device and storage medium

Also Published As

Publication number Publication date
CN111753983A (en) 2020-10-09

Similar Documents

Publication Publication Date Title
WO2021190597A1 (en) Processing method for neural network model, and related device
WO2017159614A1 (en) Learning service provision device
US8091070B2 (en) Deep embedding of program languages
US20180357201A1 (en) Ability-providing-data generation apparatus
EP4006909A1 (en) Method, apparatus and device for quality control and storage medium
US20220004914A1 (en) Code generation for auto-ai
WO2017159620A1 (en) Expandability retention device
CN114667507A (en) Resilient execution of machine learning workload using application-based profiling
CN112734040A (en) Embedded artificial intelligence computing framework and application method
US11144291B1 (en) Loop-oriented neural network compilation
WO2024036662A1 (en) Parallel graph rule mining method and apparatus based on data sampling
WO2021259039A1 (en) Neural network model customization method, system and device, and storage medium
CN116450486A (en) Modeling method, device, equipment and medium for nodes in multi-element heterogeneous computing system
CN111222636A (en) Deep learning model conversion method and device, server and storage medium
JP2020008836A (en) Method and apparatus for selecting vocabulary table, and computer-readable storage medium
CN113742231A (en) Protobuf protocol dynamic analysis-based number making method and device
CN116739154A (en) Fault prediction method and related equipment thereof
CN111753983B (en) Customization method, system, equipment and storage medium for neural network model
CN114707070A (en) User behavior prediction method and related equipment thereof
WO2021077282A1 (en) Neural network model conversion method and apparatus, server, and storage medium
US11288322B2 (en) Conversational agents over domain structured knowledge
Gutosk Qualitative Analysis of Deep Learning Frameworks
US11782706B1 (en) Reconfigurable neural network processing based on subgraph recognition
WO2023103690A1 (en) Unit testing generation method and apparatus, and related device
CN117540783B (en) Method and device for generating simulated brain activity data, electronic device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21828120

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21828120

Country of ref document: EP

Kind code of ref document: A1