WO2024046463A1 - Model construction method, apparatus and platform, electronic device and storage medium - Google Patents

Model construction method, apparatus and platform, electronic device and storage medium Download PDF

Info

Publication number
WO2024046463A1
WO2024046463A1 PCT/CN2023/116452 CN2023116452W WO2024046463A1 WO 2024046463 A1 WO2024046463 A1 WO 2024046463A1 CN 2023116452 W CN2023116452 W CN 2023116452W WO 2024046463 A1 WO2024046463 A1 WO 2024046463A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
variable
basic
information
item
Prior art date
Application number
PCT/CN2023/116452
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
Application filed by 深圳忆海原识科技有限公司 filed Critical 深圳忆海原识科技有限公司
Publication of WO2024046463A1 publication Critical patent/WO2024046463A1/en

Links

Classifications

    • 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
    • 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/0464Convolutional networks [CNN, ConvNet]
    • 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

  • the present application relates to the field of data processing technology, and in particular to a model construction method, device, platform, electronic equipment and storage medium.
  • the brain-like computing system is a new high-performance computing hardware and software system that imitates the structure and working principles of the brain's biological nervous system and supports brain-like high-performance parallel computing.
  • Brain-like intelligence and cognitive computing are based on spiking neural networks, combining a variety of neurotransmitters, neuromodulators, receptors, electrical synapses, chemical synapses, dendrites, neurons, and glial cells in the biological brain. Enrich working mechanisms for computational modeling, and construct neural circuits, neural nuclei, brain regions and whole-brain models that can simulate many cognitive mechanisms and behaviors of the biological brain.
  • the main purpose of this application is to solve the existing technical problems of relatively complex methods of building neural network models and low user experience.
  • Embodiments of the present application provide a model construction method, device, platform, electronic equipment and storage medium, which realizes the description and conversion of neural network models and simplifies the complexity of constructing neural network models.
  • embodiments of the present application provide a model construction method, including:
  • the source model of the neural network model is obtained based on the model description information.
  • the model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the first model are For constructing a neural network model; the first model is a user-defined model;
  • model conversion stage is entered to convert the source model into an executable model.
  • embodiments of the present application also provide a model building device, which includes:
  • a model description module used in the model description stage to obtain the source model of the neural network model based on the model description information.
  • the model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or The first model is used to build a neural network model; the first model is a user-defined model;
  • the model conversion module is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
  • embodiments of the present application also provide a model construction platform, which executes the model construction method of the embodiments of the present application.
  • the platform includes: a front-end part, a core part and a back-end part, wherein:
  • the front-end part is used to act as an agent outside the platform to interact with the core part and/or the back-end part;
  • the core part is used to respond to requests from the front-end part and/or the back-end part.
  • the model description phase obtain the source model of the neural network model based on the model description information.
  • the model description data includes the first model and /or pre-stored basic model information; the basic model and/or the first model are used to build a neural network model; the first model is a user-defined model;
  • the backend part is used to enter the model conversion stage when model conversion is required, and
  • the source model is converted into an executable model.
  • embodiments of the present application further provide an electronic device, where the electronic device includes:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors are caused to implement the model building method in any embodiment of the present application.
  • embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform the model building method in any embodiment of the present application. .
  • the source model of the neural network model is obtained based on the model description information.
  • the model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the third A model is used to build a neural network model.
  • the first model is a user-defined model.
  • When model conversion is required enter the model conversion stage to convert the source model into an executable model.
  • the technical solution of the embodiment of the present application simplifies the complexity of model construction, improves the model construction speed, and thereby improves user experience.
  • Figure 1 is a schematic flow chart of a model construction method in an embodiment
  • Figure 2 is a schematic structural diagram of a model building device in another embodiment
  • Figure 3 is a schematic structural diagram of a model building platform in another embodiment
  • Figure 4 is a schematic structural diagram of an electronic device in another embodiment.
  • the neural network model is a complex network model formed by interconnecting a large number of simple processing units (neurons), which reflects many basic characteristics of human brain functions.
  • the neural network model has the characteristics of large-scale parallelism, distributed storage and processing, self-organization, Adaptive and self-learning abilities.
  • the construction and training of neural network models in the existing technology need to be run on GPUs, CPUs, etc. with better performance.
  • users build neural network models they need to consider the allocation of back-end hardware devices, which increases the complexity of building neural network models and reduces user experience.
  • the embodiment of this application proposes a model construction method that can solve the above technical problems, so that users do not need to consider the back-end hardware equipment when building a model, and only need to describe the source model. After the description is completed, the model needs to be In the case of conversion, the source model is converted into an executable model.
  • the technical solution of the embodiment of the present application reduces the complexity of model construction and improves the user experience.
  • FIG. 1 is a schematic flowchart of the model construction method provided by this embodiment of the application.
  • the method may be performed by a model building device, which may Implemented in the form of software and/or hardware.
  • a model building device which may Implemented in the form of software and/or hardware.
  • the combination of software applications and back-end hardware devices implements the device.
  • Models include but are not limited to neuron models, synapse models, dendrite models, plasticity models, neuromodulation mechanism models, etc.
  • Neuron models include but are not limited to spiking neuron models, deep neuron models, and firing rate neuron models; for example, neuron models can include LIF (leaky integrate-and-fire), Hodgkin-Huxley, activation function ReLU, etc.
  • LIF leaky integrate-and-fire
  • Hodgkin-Huxley Hodgkin-Huxley
  • activation function ReLU activation function ReLU
  • model construction method in the embodiment of this application specifically includes the following steps:
  • the model description data includes information about the first model and/or a pre-stored basic model.
  • the basic model and/or the first model are used to construct a neural network model.
  • the first model is a user-defined model.
  • the basic model refers to a pre-stored model with structural information and variable information.
  • the basic model refers to the minimum processing unit or a combination of minimum processing units that constructs a neural network model.
  • the source model can be a neuron model, a neuron group model, a synapse model, a synapse group model, a dendritic model, etc.
  • the first model refers to the model defined by the user, for example, the programming code of the first model related to the source model written by the user.
  • the model description information is used to describe the neural network model, that is, the source model in the embodiment of this application.
  • the source model in the embodiment of this application refers to a neural network model with no allocated storage space.
  • the source model is described based on the model description information. This step does not need to consider the memory occupied by the source model, thereby improving the efficiency of source model acquisition.
  • the source model may be composed of at least one basic model, or it may be composed of at least one first model, or it may be composed of at least one source model and at least one first model.
  • model conversion when model conversion is required, it may refer to the case where the user inputs a model conversion instruction.
  • the executable model in the embodiment of the present application includes a source model in which storage space is allocated to the source model. That is, after the source model is allocated storage space, the executable model can be obtained.
  • the source model is converted into an executable model, and the executable model is used as the completed neural network model.
  • the user needs a source model, they can directly obtain the source model without performing model conversion, and use the source model as the neural network model that the user needs to build.
  • the technical solution of the embodiment of the present application obtains the source model based on the model description information.
  • the model description information includes the first model and/or the information of the pre-stored source model.
  • the source model and/or the first model are used to construct the neural network model.
  • the first model is a user-defined model. When model conversion is required, the source model is converted into an executable model.
  • the technical solutions of the embodiments of the present application simplify the complexity of model construction, improve the model construction speed, and thereby improve the user experience.
  • entering the model conversion stage to convert the source model into an executable model includes: if the model description information is the information of the first model , then compile the first model to obtain an executable model, and/or if the model description information is information of a basic model, obtain the executable model corresponding to the basic model.
  • the model description information is the first model
  • the first model is compiled to obtain an executable model.
  • the model description information is the source model
  • the executable model is run to test the constructed executable model.
  • the method further includes: obtaining a model identifier of at least one basic model in the model construction information, and a variable identifier of at least one variable of the basic model; based on the model identifier, retrieve the basic model corresponding to the model identifier; based on at least one of the variable identifiers, retrieve the variable registry corresponding to the basic model Obtain a variable registration item corresponding to at least one of the variable identifiers; the variable registration table includes at least one variable registration item, and the variable registration item is used to describe the variable; the source model of the neural network model is obtained based on the model description information , including: obtaining the source model based on at least the basic model and the variable registration item corresponding to the basic model.
  • the model construction information refers to the information input by the user for building the model, including the model identification of at least one basic model and the variable identification of the variables of each basic model.
  • the basic model includes multiple variables, and at least one of the multiple variables can be obtained according to user needs. Therefore, the variables in the model building information are identified as at least one.
  • the variable registration table includes at least one variable registration item, and the variable registration item is used to describe the variable.
  • the variable registry refers to a table of pre-stored variables of the basic model.
  • the variable registry includes variable identifiers and variable registration items corresponding to the variable identifiers.
  • Variable identification can be variable name, variable number, etc.
  • Variable registration items refer to the content describing variables, and the information of each variable in the basic model is stored in the corresponding variable registration table.
  • a basic model corresponds to a variable registry.
  • the model identification of at least one basic model in the model construction information and the variable identification corresponding to each basic model are obtained.
  • the basic model is stored in advance, and based on the model identifier, the basic model corresponding to the model identifier can be retrieved from the model storage area where the basic model is stored.
  • a variable registration item corresponding to the at least one variable identifier is retrieved from the variable registry corresponding to the basic model.
  • the basic model is a neuron, including two variables that describe the input port and the output port of the neuron respectively.
  • the source model of the neural network model can be described based on the neuron, the input port, and the output port. It should be noted that the source model in this step refers to the model described based on the base model and the variable registration items of the base model.
  • the model identification of the basic model and the variable identification of the variables of the basic model in the model construction information are obtained, and the basic model can be quickly retrieved according to the model identification. , and quickly retrieve the variable registration items in the variable registry of the basic model based on the variable identification.
  • the source model can be quickly described based on at least one basic model and the variable registration items of the basic model.
  • the source model is converted into an executable model.
  • model conversion when model conversion is required, it may refer to the case where a model conversion instruction input by the user is received.
  • the method further includes: obtaining at least one target variable registration sub-item of the variable; After retrieving the variable registration item corresponding to the at least one variable identifier from the variable registration table corresponding to the basic model based on the at least one variable identifier, the method further includes: detecting whether the variable registration item exists and matches the target variable.
  • Initial variable registration sub-item corresponding to the registration sub-item;
  • the variable registration item includes at least one initial variable registration sub-item, and the initial variable registration sub-item includes variable type and data class At least one item of the type; if yes, update the initial variable registration subitem based on the target variable registration subitem to obtain a new variable registration item; if not, add the at least one target variable registration subitem to the variable registration item, Get a new variable registry entry.
  • variable registration items include multiple initial variable registration sub-items.
  • the initial variable registration sub-items can be variable type, quantity type, whether it can be persisted, whether it can be shared, etc.
  • Variable types include single variables, tensor variables, etc.
  • the data type refers to the type of data corresponding to the variable type. For example, the data type of a single variable is a numeric value, the data type of a tensor variable is a multi-dimensional array, etc. Whether to persist includes whether the variable remains unchanged in the source model, and whether to share includes whether the variable is shared with other models.
  • the target variable registration sub-item of the model construction information After obtaining the target variable registration sub-item of the model construction information, it is detected whether there is an initial variable registration sub-item corresponding to the target variable registration sub-item in the initial variable registration item of the variable. If so, based on the target variable registration sub-item Update the initial variable registration subkey and obtain a new variable registration key. If not, add the target variable registration subkey to the variable registration key to obtain a new variable registration key.
  • the user can adjust the variables of the existing basic model to obtain a basic model suitable for constructing a neural network model, thereby improving the flexibility of neural network model construction.
  • the basic model stored in the model storage area may be a collective name for a class of models with the same number of variables.
  • the variable registry corresponding to the neuron model includes Three variables, and when actually calling the neuron model, you can call two of the variables, or you can call one of the variables. In this case, when the two variables are called, based on the neuron model
  • the first neural network model is described with two variables.
  • the second neural network model is described based on the neuron model and one variable. It should be understood that the first neural network model and the second neural network model here are different.
  • the basic model and the variable registry of the basic model stored in this way can reduce resource usage.
  • obtaining the source model based on at least the basic model and the variable registration items corresponding to the basic model includes: temporarily storing the basic model and the variable registration items corresponding to the basic model. The variable registration key to get the source model.
  • At least one basic model and at least one variable registration item corresponding to the basic model are temporarily stored to describe the neural network model, that is, to obtain the source model. So that when converting the source model, the source model can be converted based on the stored basic model and variable registration items. It should be noted that in the model description stage, only the basic model retrieved based on the model identifier and the variable registration items retrieved based on the variable identifier need to be stored, which facilitates user operation and also improves the efficiency of neural network model description. .
  • the synchronous filling method is to fill in the variables immediately when the content to be filled is described, including: allocating storage space if the variables of the basic model and/or the first model have not yet been allocated storage space. ; Based on the content of the variable to be filled, obtain the data value to be filled, and fill in the variables of the basic model and/or the first model.
  • the asynchronous filling method is to fill in any moment after describing the content of the variables to be filled, including: if the variables of the basic model and/or the first model have not yet allocated storage space, then Allocate storage space; based on the content of the variable to be filled, obtain the data value to be filled, and fill the variables of the basic model and/or the first model.
  • the method further includes: using a synchronous filling method to fill in the variables of the basic model and/or the first model, or using an asynchronous filling method to fill in the basic model and/or the first model.
  • the variables of the model are filled in.
  • the model description information includes content to be filled in variables.
  • variable filler can generate the data value to be filled according to the specified content of the variable to be filled and/or the specified filling method.
  • the content and filling method of the variables to be filled are relatively simple.
  • the upper concept of an object, while the data value to be filled is specific.
  • the specified filling method includes a synchronous filling method and/or an asynchronous filling method.
  • the synchronous filling method means that when the variable to be filled in the specified variable is determined, the system allocates storage space for the specified variable (if the storage space has been allocated, there is no need to allocate it again) and fills it;
  • the asynchronous filling method refers to determining When a variable with a specified variable is to be filled, it will not be filled immediately, but will be filled in later (such as the model compilation stage) after the storage space is allocated to the specified variable (if the storage space has been allocated, there is no need to allocate it again) .
  • storage space is allocated immediately in synchronous filling mode, while storage space can be allocated delayed in asynchronous filling mode.
  • the storage space may not be actually allocated for the variable, but the variable filler and/or filling method can be specified in the API where the variable is declared, that is, the content to be filled in the variable is determined. This variable is filled when the storage space is allocated, which helps decouple the source model from hardware details.
  • variables are filled in a synchronous filling method or an asynchronous filling method, and adaptive changes can be made according to the actual situation of the system when filling variables. Filling variables through synchronous filling or asynchronous filling improves the flexibility of variable filling.
  • variables in the basic model are single variables
  • data values to be filled can be assigned to the variables of the basic model and/or the first model.
  • the user's variable updated data value to be filled is received, and the data value to be filled is directly filled into the allocated storage space. in the variables of the base model and/or the first model.
  • Data values include specific values corresponding to data types.
  • the quantity type of a tensor variable is a multi-dimensional array
  • the data value refers to the specific data value of the multi-dimensional array.
  • the data type in the variable registration item in the embodiment of this application refers to multi-dimensional arrays, numerical values, strings, etc.
  • the data type includes specific data values.
  • the data type is numerical value
  • the specific numerical value is 2.
  • the data value is not limited to the value corresponding to the data type.
  • the user can add or delete the variable registration sub-items in the variable registration item according to the actual situation, or adjust the variables of the first model, etc. Therefore, the data values will also change accordingly.
  • the storage space in the embodiment of this application may be the memory space of a GPU, CPU, etc.
  • the basic model in the embodiment of the present application includes at least one variable. If a certain basic model includes tensor variables and single variables, the basic model allocates storage space according to the tensor variable and performs data value to be filled. Filling, and calling the univariate data value to be filled, completing the initialization of the basic model. In the same way, the above operations of the first model and the basic model are the same and will not be described again here.
  • variable registration item includes multiple variable registration sub-items, and the data values to be filled in the variable registration sub-items of the tensor variable include multi-dimensional arrays; according to the variable The corresponding variable registration item calls the data value to be filled to fill the variables of the basic model and/or the first model that have been allocated storage space, including: when the variable type of the basic model is a tensor variable, according to The multi-dimensional array in the variable registration sub-item allocates storage space to the basic model, and fills the multi-dimensional array with the basic model allocated storage space.
  • variable type of the basic model is a tensor variable
  • the storage space is allocated to the basic model according to the multi-dimensional array in the variable registration sub-item, and the basic model allocated the storage space is multi-dimensional.
  • Array filling, through this filling method, tensor variables can be filled into multi-dimensional arrays to achieve preparation before running the executable model. Allocate storage space to the basic model for multi-dimensional arrays to ensure the rationality of storage space allocation.
  • the basic model with allocated storage space is filled with a multi-dimensional array, including: using at least one of constant filling, copy filling, uniform random filling, normal random filling and local convolution filling.
  • a variable filling method fills multi-dimensional arrays in the basic model.
  • filling the multi-dimensional array of the basic model allocated with storage space includes: filling the multi-dimensional array with the basic model allocated with storage space through a variable filler.
  • variable filler is preset, and the variable filler can cooperate according to a specified method or a default method to fill variables, here it is the filling of multi-dimensional arrays.
  • the basic model with allocated storage space is filled with multi-dimensional arrays through variable fillers.
  • variable filler in the embodiment of the present application can fill in the variables of the basic model with random values according to the value interval specified by the user. That is, when the user inputs the model construction information, he not only inputs the variable identifier, but also inputs The variable registration subkey of the variable is specified, and the content in the variable registration subkey is limited or updated.
  • the data values to be filled can be filled in the basic model according to the specific data values to be filled or the numerical range in the variable registration sub-item.
  • the method further includes: obtaining each basic model. Topological structure information between models; the source model is obtained based on at least the basic model and the variable registration items corresponding to the basic model, including: based on each basic model and the variable registration items corresponding to each basic model and topological structure information to obtain the source model.
  • the topological structure information is used to describe the connection method between basic models, the data transmission method between basic models, the data format, etc.
  • Independent base models can be connected through topology information.
  • model identifiers of multiple basic models are obtained from the model construction information, and topological structure information between each basic model is obtained.
  • the neural network model is described, that is, the source model is obtained.
  • source models of various frameworks and structures can be obtained.
  • the topology information includes port information and/or model information of data transmission; the model information includes at least one item of the input model information and the output model information of the basic model; if the basic model If it is a port model, the topology information includes port information; if the basic model is a container model, the topology information includes the model information.
  • the port model includes a port and a model body, and the port model may refer to a basic model with ports.
  • the model subject may refer to neurons, synapses, neuron groups, synapse groups, etc.
  • Ports include input ports, output ports, reference ports, connection ports, etc.
  • Port information is used to describe the connection method between basic models.
  • the output port of basic model A is connected to the input port of basic model B.
  • the port information includes at least one of input port information, output port information, reference port information and connection port information.
  • Reference ports provide a mechanism for port models to reference variables of other port models, and the two parties have a strict binding relationship. Reference ports are used to share information between at least two port model objects.
  • a connection port is a model management interface that is bound to a connection model. Connection ports are used to dynamically bind other port models to another port model.
  • the container model involves placing one or more components in a container. For example, place one or more neurons in a container to obtain container 1, and place container 1 and multiple neurons in container 3. Place container 1 and container 3 in container 4 and so on.
  • a component can be a single neuron or a container.
  • the model information is used to determine the input model and the output model.
  • the input model information can be the identifier of the input model to determine the corresponding input model.
  • the output model information can also be the identifier of the output model to determine the output model.
  • the model type of the input model and the model type of the output model are set in the container model in advance. For example, when the model type of the input model of container model A is the same as the model type of the output model type of container model C, the two can be connected.
  • the port information of the port model is obtained
  • the model type is obtained.
  • the topology of type and container models enables describing the source model through multiple base models. It should be noted that when the container model sets input ports and output ports, the container model at this time can refer to the port model.
  • the source model can be described through the port model paradigm.
  • the port model description paradigm includes at least one of a port model class and a port model template, so as to determine the port model based on at least one of the port model description paradigms of the port model class and the port model template.
  • the port model description paradigm refers to arranging one or more components of the basic model into one or more port models.
  • Port models can be associated through one or more ports to facilitate variable reference or sharing, forming nested, hierarchical Organizational methods such as connections and cycles. In this way, the information flow is clearer, the model organization form is more flexible, and the degree of modularization is better.
  • the neuron port model can be derived based on the port model class.
  • the ports in the neuron port model include at least input ports and output ports, and the main body of the model is configured as The leaky integral function, a single variable as the threshold of the neuron, the single variable as the membrane potential of the neuron, and the input port is configured to accept the input of one or more neurons, and the output port is connected to one or more neurons.
  • the source model is described based on the container model, variable registration items and topology structure information.
  • the container model paradigm can be used to describe the source model, that is, one or more components of the basic model are arranged in one or more containers. Model management and scheduling are performed through containers.
  • the container model paradigm includes at least one of a container class and a container template.
  • the paradigm is described based on at least one of the container class and the container template to form container models at different levels.
  • Containers can form cascade, tree, flat, nested and other organizational forms.
  • the container model includes node containers, that is, neuron containers. Node containers can be constructed by describing the basic model according to variables.
  • the node container types include but are not limited to: neuron models, synapse models, dendrite models, etc. Connect the created node containers to form a network model, which is also the source model.
  • the network topology includes but is not limited to: feed-forward structure, feedback structure, cross-layer structure, lateral structure, loop structure, self-loop structure, neuron-to-neuron direct connection structure, synapse and Synaptic direct connection structure, synapse and dendrite direct connection structure.
  • the method further includes: when receiving model update information, updating the source model based on the model update information to obtain a new source model. , and determine whether the new source model is the same as each basic model and/or topological structure information in the source model. If not, obtain the corresponding new available model based on each basic model and/or topological structure information of the new source model. Execution model.
  • the model update information in the embodiment of the present application may be an update to the basic model structure, for example, adding some neurons to the original basic model, or it may be a deletion of the basic model, for example, deleting At least one base model in the source model may also be an update of the topology structure between the base models. For example, if basic model A is connected to basic model B, it is updated to be connected to basic model A and basic model C. Specifically, after obtaining the executable model, the model update information is received, the source model is updated based on the model update information, and a new source model is obtained. After the source model is updated, each element in the new source model is judged. Whether the basic model and/or the topological structure between each basic model has changed?
  • the method further includes: when the update information of the variables of the received basic model/first model is detected, updating based on the update information of the variables.
  • the variables in the basic model/first model are used to obtain an updated basic model/first model; the update information includes at least one of adding variables, deleting variables, and updating data values of variables.
  • the update of the variable registration sub-item can be the adjustment of whether the variable is shared, the update of the specific data value of the variable's data type, etc.
  • multiple first variables are added based on the variables of the original basic model.
  • the update information includes the model identifier of the basic model, the variable identifier of the first variable added in the basic model, and the variable registration item corresponding to the first variable.
  • a deletion identifier can be set. When a certain variable identifier and a deletion identifier exist in the update information, the variable registration item corresponding to the variable identifier in the basic model is deleted.
  • the modification information of the variables of the first model can also be obtained for the first model.
  • the update information of any variable input by the user is detected, and the variables in the basic model are updated based on the update information to obtain a new basic model.
  • the update information includes the update of the variable registration sub-item of any variable, which may be to update the data value of the corresponding variable registration sub-item of the variable in the basic model.
  • the data value here can refer to the specific data value corresponding to the data type, or whether the sharing is Y or F, etc., where Y here means yes, and F means no.
  • the storage space will be reallocated and the data values will be filled in again. Convert. This step improves the flexibility of neural network model construction.
  • the user's variable update information can also be received during the process of converting the source model into an executable model.
  • FIG. 2 is a schematic structural diagram of the model construction device provided by the embodiment of the present application.
  • the model construction device provided by the embodiment of the present application can execute any embodiment of the present application.
  • the provided model construction method has functional modules and beneficial effects corresponding to the execution method.
  • the device includes: model description module 210 and model conversion module 220; wherein:
  • the model description module 210 is used to obtain the source model of the neural network model based on the model description information during the model description stage.
  • the model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/ Or the first model is used to build a neural network model; the first model is a user-defined model;
  • the model conversion module 220 is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
  • model conversion module is also used to:
  • model description information is the information of the first model, compile the first model to obtain an executable model, and/or if the model description information is the information of the basic model, obtain the executable model corresponding to the basic model. Execution model.
  • the device further includes:
  • a variable registration item acquisition module is used to obtain the model identifier of at least one basic model in the model construction information and the variable identifier of at least one variable of the basic model; based on the model identifier, retrieve the model identifier corresponding to the model identifier.
  • Basic model based on at least one of the variable identifiers, retrieve a variable registration item corresponding to at least one of the variable identifiers from the variable registration table corresponding to the basic model; the variable registration table includes at least one variable registration item, so The variable registration item is used to describe the variable;
  • the model description module 210 is also configured to: based on at least the basic model and the corresponding The variable registration item obtains the source model.
  • the device further includes:
  • a variable filling module is used to fill in the variables of the basic model and/or the first model using a synchronous filling method, or to fill the variables of the basic model and/or the first model using an asynchronous filling method.
  • variable filling module includes: a synchronous filling sub-module, which is used to fill in the variable immediately when describing the content to be filled, and a synchronous filling sub-module, which is also used to: if the basic model and /or the variables of the first model have not been allocated storage space, then allocate storage space; based on the content to be filled in the variables, obtain the data values to be filled, and fill the variables of the basic model and/or the first model.
  • variable filling module includes: an asynchronous filling sub-module, used to fill at any time after describing the content of the variable to be filled, an asynchronous filling sub-module, also used to if the basic If the variables of the model and/or the first model have not yet been allocated storage space, allocate storage space; based on the content to be filled in the variables, obtain the data values to be filled, and fill the variables of the basic model and/or the first model.
  • variable registration item includes multiple variable registration sub-items, and the data values to be filled in the variable registration sub-items of the tensor variable include multi-dimensional arrays;
  • variable filling module is also used to: when the variable type of the basic model is a tensor variable, allocate storage space to the basic model according to the multi-dimensional array in the variable registration sub-item, and allocate the basis of the storage space.
  • the model performs filling of multidimensional arrays.
  • variable filling module is also used to:
  • variable filling module is also used to:
  • the basic model with allocated storage space is filled with multi-dimensional arrays through variable fillers.
  • the device when the model description information is a basic model, and the model identifiers of multiple basic models are obtained from the model construction information, the device further includes:
  • the information acquisition module is used to obtain the topological structure information between each basic model
  • the model description module 210 is also used to:
  • the source model is obtained based on each basic model, the variable registration items corresponding to each basic model, and the topological structure information.
  • the topology information includes port information and/or model information of data transmission; the model information includes at least one of the input model information and the output model information of the basic model; if the basic If the model is a port model, the topology information includes port information; if the base model is a container model, the topology information includes the model information.
  • the port information includes at least one of input port information, output port information, reference port information and connection port information.
  • the device further includes:
  • the model update module is used to update the source model based on the model update information when receiving the model update information, obtain a new source model, and determine whether the new source model is consistent with each basic model in the source model and/or Whether the topological structure information is the same, if not, the corresponding new executable model is obtained based on each basic model and/or topological structure information of the new source model.
  • the device further includes:
  • Variable update module used when detecting the update information of the variables of the received basic model/first model When, the variables in the basic model/first model are updated based on the update information of the variables to obtain an updated basic model/first model; the update information includes data values of added variables, deleted variables and updated variables. at least one of.
  • model description module 210 is also used to:
  • the device further includes:
  • a variable registration sub-item acquisition module used to obtain at least one target variable registration sub-item of the variable
  • a variable registration item update module is used to detect whether the variable registration item has an initial variable registration sub-item corresponding to the target variable registration sub-item; the variable registration item includes at least one initial variable registration sub-item, and the initial variable The registration sub-item includes at least one of variable type and data type; if yes, update the initial variable registration sub-item based on the target variable registration sub-item to obtain a new variable registration item; if not, add the above-mentioned variable registration item to the variable registration item At least one target variable registration subkey is obtained, and a new variable registration key is obtained.
  • the source model of the neural network model is obtained based on the model description information.
  • the model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the third A model is used to build a neural network model.
  • the first model is a user-defined model.
  • When model conversion is required enter the model conversion stage to convert the source model into an executable model.
  • the technical solution of the embodiment of the present application simplifies the complexity of model construction, improves the model construction speed, and thereby improves user experience.
  • FIG. 3 is a schematic structural diagram of a model building platform provided by an embodiment of the present application.
  • the platform is used to execute the following when building a neural network model:
  • the platform includes: a front-end part 310, a core part 320 and a back-end part 330, where:
  • the front-end part 310 is used to interact with the core part and/or the back-end part on behalf of the outside of the platform;
  • the core part 320 is used to respond to requests from the front-end part and/or the back-end part.
  • the model description data includes the first model. and/or pre-stored basic model information; the basic model and/or the first model are used to build a neural network model; the first model is a user-defined model;
  • the backend part 330 is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
  • the outside of the system (such as users, other systems) will interact with the platform through the front-end part 310, thereby calling at least one function of the platform. For example, call the platform configuration model.
  • the front-end part 310 provided by the embodiment of the present application can receive requests input by the user, optionally, can display the neural network model built by the user, and can also display the running status of the neural network model.
  • the core part 320 obtains the source model based on the model description information, and the backend part 330 converts the source model into an executable model when model conversion is required.
  • the front-end part 310, the core part 320 and the back-end part 330 of the model building platform in the embodiment of the present application have a clear division of labor and cooperate with each other to realize the construction of the neural network model, which improves the efficiency of the construction, and because the core part 320 only describes the model , there is no need to consider issues related to model conversion.
  • the backend part 330 converts the source model into an executable model.
  • the model construction platform of the embodiment is convenient for user operations, simplifies the process of model construction, reduces the complexity of model construction, and improves user experience.
  • the back-end hardware devices include but are not limited to GPU, TPU, neuromorphic chips, artificial intelligence chips, etc.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by this embodiment of the present application. 4 illustrates a block diagram of an exemplary electronic device 50 suitable for implementing embodiments of the present application.
  • the electronic device 50 shown in FIG. 4 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present application.
  • electronic device 50 is embodied in the form of a general computing device.
  • the components of the electronic device 50 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 connecting different system components (including the system memory 502 and the processing unit 501).
  • Bus 503 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect ( PCI) bus.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Video Electronics Standards Association
  • PCI Peripheral Component Interconnect
  • Electronic device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 50, including volatile and nonvolatile media, removable and non-removable media.
  • System memory 502 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and/or cache memory 505 .
  • Electronic device 50 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 506 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 4, commonly referred to as a "hard drive”).
  • a disk drive may be provided for reading and writing to removable non-volatile disks (e.g., "floppy disks"), and for removable non-volatile optical disks (e.g., CD-ROM, DVD-ROM).
  • each drive may be connected to bus 503 through one or more data media interfaces.
  • the memory 502 may include at least one program product having a set (eg, at least one) program module configured to perform the functions of various embodiments of the present application.
  • Program modules 507 generally perform functions and/or methods in the embodiments described herein.
  • Electronic device 50 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with electronic device 50, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 50 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 511.
  • the electronic device 50 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 512. As shown, network adapter 512 communicates with other modules of electronic device 50 via bus 503 .
  • the processing unit 501 executes various functional applications and data processing by running programs stored in the system memory 502, for example, implementing the model building method provided by the embodiment of the present application.
  • a storage medium containing computer-executable instructions is also provided.
  • the computer-executable instructions when executed by a computer processor, are used to perform a model construction method, and the method includes:
  • the source model of the neural network model is obtained based on the model description information.
  • the model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the first model are For constructing a neural network model; the first model is a user-defined model; when model conversion is required, the model conversion stage is entered to convert the source model into an executable model.
  • the computer storage medium in the embodiment of the present application may be 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 is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections having one or more conductors, portable computer disks, hard drives, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing operations of embodiments of the present application may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and combinations thereof, including Conventional procedural programming language - such as "C" or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as an Internet service provider through Internet connection

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

Embodiments of the present application provide a model construction method, apparatus and platform, an electronic device and a storage medium. The method comprises: in a model description stage, obtaining a source model of a neural network model on the basis of model description information, the model description data comprising information of a first model and/or a pre-stored basic model, the basic model and/or the first model being used for constructing the neural network model, and the first model being a user-defined model; and when model conversion needs to be performed, entering a model conversion stage to convert the source model into an executable model. The technical solution of the embodiments of the present application reduces the complexity of neural network model construction.

Description

模型构建方法、装置、平台、电子设备及存储介质Model construction method, device, platform, electronic equipment and storage medium
本申请要求于2022年09月02日提交中国专利局、申请号为202211068160.0,发明名称为“模型构建方法、装置、平台、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on September 2, 2022, with the application number 202211068160.0, and the invention name is "Model Construction Method, Device, Platform, Electronic Equipment and Storage Medium", and its entire content is approved by This reference is incorporated into this application.
技术领域Technical field
本申请涉及一种数据处理技术领域,尤其涉及一种模型构建方法、装置、平台、电子设备及存储介质。The present application relates to the field of data processing technology, and in particular to a model construction method, device, platform, electronic equipment and storage medium.
背景技术Background technique
类脑计算系统是构建新型高性能计算硬件与软件系统,模仿大脑生物神经系统的结构与工作原理,支撑类脑高性能并行计算。类脑智能和认知计算以脉冲神经网络为基础,结合生物脑中的多种神经递质、神经调质、受体、电突触、化学突触、树突、神经元、胶质细胞的丰富工作机制进行计算建模,构造成的神经环路、神经核团、脑区和全脑模型,能够模拟生物脑的诸多认知机制和行为。The brain-like computing system is a new high-performance computing hardware and software system that imitates the structure and working principles of the brain's biological nervous system and supports brain-like high-performance parallel computing. Brain-like intelligence and cognitive computing are based on spiking neural networks, combining a variety of neurotransmitters, neuromodulators, receptors, electrical synapses, chemical synapses, dendrites, neurons, and glial cells in the biological brain. Enrich working mechanisms for computational modeling, and construct neural circuits, neural nuclei, brain regions and whole-brain models that can simulate many cognitive mechanisms and behaviors of the biological brain.
发明人发现现今的搭建神经网络模型的方式较为复杂,用户体验度低,因此,需要一种模型构建方法以解决上述的技术问题。The inventor found that the current method of building a neural network model is relatively complex and has low user experience. Therefore, a model construction method is needed to solve the above technical problems.
技术问题technical problem
本申请的主要目的旨在解决现有的现今的搭建神经网络模型的方式较为复杂,用户体验度低的技术问题。The main purpose of this application is to solve the existing technical problems of relatively complex methods of building neural network models and low user experience.
技术解决方案Technical solutions
本申请实施例提供一种模型构建方法、装置、平台、电子设备及存储介质,实现了对神经网络模型的描述和转换,简化了构建神经网络模型的复杂度。Embodiments of the present application provide a model construction method, device, platform, electronic equipment and storage medium, which realizes the description and conversion of neural network models and simplifies the complexity of constructing neural network models.
第一方面,本申请实施例提供了一种模型构建方法,包括:In the first aspect, embodiments of the present application provide a model construction method, including:
在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;In the model description stage, the source model of the neural network model is obtained based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the first model are For constructing a neural network model; the first model is a user-defined model;
在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。When model conversion is required, the model conversion stage is entered to convert the source model into an executable model.
第二方面,本申请实施例还提供了一种模型构建装置,所述装置包括:In a second aspect, embodiments of the present application also provide a model building device, which includes:
模型描述模块,用于在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;A model description module, used in the model description stage to obtain the source model of the neural network model based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or The first model is used to build a neural network model; the first model is a user-defined model;
模型转换模块,用于在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。The model conversion module is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
第三方面,本申请实施例还提供了一种模型构建平台,所述平台执行如本申请实施例的模型构建方法,所述平台包括:前端部分、核心部分和后端部分,其中:In a third aspect, embodiments of the present application also provide a model construction platform, which executes the model construction method of the embodiments of the present application. The platform includes: a front-end part, a core part and a back-end part, wherein:
所述前端部分,用于用于代理所述平台外部与所述核心部分和/或所述后端部分进行交互;The front-end part is used to act as an agent outside the platform to interact with the core part and/or the back-end part;
所述核心部分,用于响应所述前端部分和/或所述后端部分的请求,在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;The core part is used to respond to requests from the front-end part and/or the back-end part. In the model description phase, obtain the source model of the neural network model based on the model description information. The model description data includes the first model and /or pre-stored basic model information; the basic model and/or the first model are used to build a neural network model; the first model is a user-defined model;
所述后端部分,用于在需要进行模型转换的情况下,进入模型转换阶段,将 所述源模型转换为可执行模型。The backend part is used to enter the model conversion stage when model conversion is required, and The source model is converted into an executable model.
第四方面,本申请实施例还提供了一种电子设备,所述电子设备包括:In a fourth aspect, embodiments of the present application further provide an electronic device, where the electronic device includes:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,a storage device for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本申请任一实施例中的模型构建方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the model building method in any embodiment of the present application.
第五方面,本申请实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本申请任一实施例中的模型构建方法。In a fifth aspect, embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform the model building method in any embodiment of the present application. .
有益效果beneficial effects
通过本申请实施例的技术方案,在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,模型描述数据包括第一模型和/或预先存储的基础模型的信息;基础模型和/或第一模型用于构建神经网络模型。第一模型为用户自定义的模型。在需要进行模型转换的情况下,进入模型转换阶段,将源模型转换为可执行模型。本申请实施例的技术方案简化了模型构建时的复杂度,提高了模型构建速度,进而提高了用户体验度。Through the technical solution of the embodiment of the present application, in the model description stage, the source model of the neural network model is obtained based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the third A model is used to build a neural network model. The first model is a user-defined model. When model conversion is required, enter the model conversion stage to convert the source model into an executable model. The technical solution of the embodiment of the present application simplifies the complexity of model construction, improves the model construction speed, and thereby improves user experience.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present application or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
其中:in:
图1为一个实施例中模型构建方法的流程示意图;Figure 1 is a schematic flow chart of a model construction method in an embodiment;
图2为另一实施例中模型构建装置的结构示意图;Figure 2 is a schematic structural diagram of a model building device in another embodiment;
图3为另一实施例中的模型构建平台的结构示意图;Figure 3 is a schematic structural diagram of a model building platform in another embodiment;
图4为另一实施例中的电子设备的结构示意图。Figure 4 is a schematic structural diagram of an electronic device in another embodiment.
本申请的实施方式Implementation Mode of this Application
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
在阐述本申请实施例的技术方案之前,首先对本申请实施例的应用场景进行示例性说明:Before elaborating on the technical solutions of the embodiments of the present application, first an exemplary description of the application scenarios of the embodiments of the present application is given:
神经网络模型由大量、简单的处理单元(神经元)互相连接而形成的复杂网络模型,反映了人脑功能的许多基本特征,神经网络模型具有大规模并行、分布式存储和处理、自组织、自适应和自学能力。现有技术中的神经网络模型的构建和训练需要在性能更加优异的GPU、CPU等上运行。用户在构建神经网络模型时,需要考虑后端硬件设备的分配情况,加大了用户构建神经网络模型的复杂度,降低了用户体验度。本申请实施例提出一种模型构建方法,可以解决上述的技术问题,使得用户在构建模型时,无需考虑后端硬件设备情况,只需要描述源模型即可,当描述完成后,在需要进行模型转换的情况下,将源模型转换为可执行模型,本申请实施例的技术方案降低了模型构建复杂度,提高了用户体验度。The neural network model is a complex network model formed by interconnecting a large number of simple processing units (neurons), which reflects many basic characteristics of human brain functions. The neural network model has the characteristics of large-scale parallelism, distributed storage and processing, self-organization, Adaptive and self-learning abilities. The construction and training of neural network models in the existing technology need to be run on GPUs, CPUs, etc. with better performance. When users build neural network models, they need to consider the allocation of back-end hardware devices, which increases the complexity of building neural network models and reduces user experience. The embodiment of this application proposes a model construction method that can solve the above technical problems, so that users do not need to consider the back-end hardware equipment when building a model, and only need to describe the source model. After the description is completed, the model needs to be In the case of conversion, the source model is converted into an executable model. The technical solution of the embodiment of the present application reduces the complexity of model construction and improves the user experience.
在一本申请实施例中,提供了一种模型构建方法,图1为本申请实施例提供的模型构建方法的流程示意图。该方法可以由模型构建装置来执行,该装置可以 通过软件和/或硬件的形式实现。比如,软件的应用程序与后端硬件设备的结合实现该装置。模型包括但不限于神经元模型、突触模型、树突模型、可塑性模型、神经调制机制模型等。In an embodiment of this application, a model construction method is provided. Figure 1 is a schematic flowchart of the model construction method provided by this embodiment of the application. The method may be performed by a model building device, which may Implemented in the form of software and/or hardware. For example, the combination of software applications and back-end hardware devices implements the device. Models include but are not limited to neuron models, synapse models, dendrite models, plasticity models, neuromodulation mechanism models, etc.
神经元模型包括但不限于脉冲神经元模型、深度神经元模型、发放率神经元模型;举例来说,神经元模型可以包括LIF(leaky integrate-and-fire)、Hodgkin-Huxley、激活函数ReLU等模型,既可以采用偏微分方程,也可以用欧拉方式或其它函数描述其动力学。Neuron models include but are not limited to spiking neuron models, deep neuron models, and firing rate neuron models; for example, neuron models can include LIF (leaky integrate-and-fire), Hodgkin-Huxley, activation function ReLU, etc. The model can either use partial differential equations or use Euler methods or other functions to describe its dynamics.
如图1所示,本申请实施例的模型构建方法具体包括如下步骤:As shown in Figure 1, the model construction method in the embodiment of this application specifically includes the following steps:
S110、在模型描述阶段,基于模型描述信息得到神经网络模型的源模型。S110. In the model description stage, obtain the source model of the neural network model based on the model description information.
其中,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息。所述基础模型和/或所述第一模型用于构建神经网络模型。所述第一模型为用户自定义的模型。基础模型是指预先存储的具有结构信息和变量信息的模型。基础模型是指构建神经网络模型的最小处理单元或者最小处理单元的组合单元,比如,源模型可以是神经元模型、神经元组模型、突触模型、突触组模型、树突模型等。第一模型是指用户自己定义的模型,比如,用户编写的与源模型相关的第一模型的编程代码。模型描述信息用于描述神经网络模型,也即本申请实施例中的源模型。本申请实施例中的源模型是指未分配存储空间的神经网络模型。The model description data includes information about the first model and/or a pre-stored basic model. The basic model and/or the first model are used to construct a neural network model. The first model is a user-defined model. The basic model refers to a pre-stored model with structural information and variable information. The basic model refers to the minimum processing unit or a combination of minimum processing units that constructs a neural network model. For example, the source model can be a neuron model, a neuron group model, a synapse model, a synapse group model, a dendritic model, etc. The first model refers to the model defined by the user, for example, the programming code of the first model related to the source model written by the user. The model description information is used to describe the neural network model, that is, the source model in the embodiment of this application. The source model in the embodiment of this application refers to a neural network model with no allocated storage space.
具体的,基于模型描述信息描述出源模型,本步骤不需要考虑源模型占用内存情况,提高源模型获取的效率。可选的,源模型可以是由至少一个基础模型构成,也可以是由至少一个第一模型构成,还可以是由至少一个源模型和至少一个第一模型构成。Specifically, the source model is described based on the model description information. This step does not need to consider the memory occupied by the source model, thereby improving the efficiency of source model acquisition. Optionally, the source model may be composed of at least one basic model, or it may be composed of at least one first model, or it may be composed of at least one source model and at least one first model.
S120、在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。S120. When model conversion is required, enter the model conversion stage to convert the source model into an executable model.
本申请实施例中,在需要进行模型转换的情况下,可以是指用户输入了模型转换指令的情况。本申请实施例中的可执行模型包括将源模型分配了存储空间的源模型,也即在将源模型分配了存储空间之后,可以得到可执行模型。In the embodiment of the present application, when model conversion is required, it may refer to the case where the user inputs a model conversion instruction. The executable model in the embodiment of the present application includes a source model in which storage space is allocated to the source model. That is, after the source model is allocated storage space, the executable model can be obtained.
具体的,将源模型转换为可执行模型,将可执行模型作为构建完成的神经网络模型。当然,若是用户需要的是源模型,也可以不进行模型转换,直接得到源模型,将源模型作为用户需要构建的神经网络模型。Specifically, the source model is converted into an executable model, and the executable model is used as the completed neural network model. Of course, if the user needs a source model, they can directly obtain the source model without performing model conversion, and use the source model as the neural network model that the user needs to build.
本申请实施例的技术方案,通过基于模型描述信息得到源模型,模型描述信息包括第一模型和/或预先存储的源模型的信息,源模型和/或第一模型用于构建神经网络模型,第一模型为用户自定义的模型。在需要进行模型转换的情况下,将源模型转换为可执行模型,本申请实施例的技术方案简化了模型构建时的复杂度,提高了模型构建速度,进而提高了用户体验度。The technical solution of the embodiment of the present application obtains the source model based on the model description information. The model description information includes the first model and/or the information of the pre-stored source model. The source model and/or the first model are used to construct the neural network model. The first model is a user-defined model. When model conversion is required, the source model is converted into an executable model. The technical solutions of the embodiments of the present application simplify the complexity of model construction, improve the model construction speed, and thereby improve the user experience.
在另一本申请实施例中,所述在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型,包括:若所述模型描述信息为第一模型的信息,则编译所述第一模型,得到可执行模型,和/或若所述模型描述信息为基础模型的信息,则获取所述基础模型对应的可执行模型。In another embodiment of the present application, when model conversion is required, entering the model conversion stage to convert the source model into an executable model includes: if the model description information is the information of the first model , then compile the first model to obtain an executable model, and/or if the model description information is information of a basic model, obtain the executable model corresponding to the basic model.
本申请实施例中,针对不同的模型描述信息具有不同的转换方式,在模型描述信息为第一模型的情况下,编译第一模型,得到可执行模型,在模型描述信息为源模型的情况下,获取源模型对应的可执行模型。由于源模型为预先存储的模型,所以,在获取了源模型的结构信息以及变量信息,可以得到对应的可执行模型。由于第一模型是用户编写的编程代码,对编程代码进行编译,得到可执行模型。 In the embodiments of this application, there are different conversion methods for different model description information. When the model description information is the first model, the first model is compiled to obtain an executable model. When the model description information is the source model, , obtain the executable model corresponding to the source model. Since the source model is a pre-stored model, after obtaining the structure information and variable information of the source model, the corresponding executable model can be obtained. Since the first model is the programming code written by the user, the programming code is compiled to obtain an executable model.
在另一本申请实施例中,在得到可执行模型后,运行可执行模型,可以测试构建的可执行模型。In another embodiment of the present application, after obtaining the executable model, the executable model is run to test the constructed executable model.
在所述模型描述信息为预先存储的源模型的信息的情况下,所述基于模型描述信息得到神经网络模型的源模型之前,还包括:获取模型构建信息中的至少一个基础模型的模型标识,以及所述基础模型的至少一个变量的变量标识;基于所述模型标识,调取与所述模型标识对应的基础模型;基于至少一个所述变量标识,从与基础模型对应的变量注册表中调取与至少一个所述变量标识对应的变量注册项;所述变量注册表中包括至少一个变量注册项,所述变量注册项用于描述变量;所述基于模型描述信息得到神经网络模型的源模型,包括:至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型。In the case where the model description information is information of a pre-stored source model, before obtaining the source model of the neural network model based on the model description information, the method further includes: obtaining a model identifier of at least one basic model in the model construction information, and a variable identifier of at least one variable of the basic model; based on the model identifier, retrieve the basic model corresponding to the model identifier; based on at least one of the variable identifiers, retrieve the variable registry corresponding to the basic model Obtain a variable registration item corresponding to at least one of the variable identifiers; the variable registration table includes at least one variable registration item, and the variable registration item is used to describe the variable; the source model of the neural network model is obtained based on the model description information , including: obtaining the source model based on at least the basic model and the variable registration item corresponding to the basic model.
其中,模型构建信息是指用户输入的、用于构建模型的信息,包括至少一个基础模型的模型标识和每个基础模型的变量的变量标识。需要说明的是,本申请实施例中基础模型包括多个变量,可以根据用户需要,获取多个变量中的至少一个。因此,模型构建信息中的变量标识为至少一个。变量注册表中包括至少一个变量注册项,变量注册项用于描述变量。变量注册表是指预先存储的基础模型的各个变量的表。变量注册表包括变量标识和与变量标识对应的变量注册项。变量标识可以是变量名称、变量编号等。变量注册项是指描述变量的内容,基础模型中各个变量的信息存储在对应的变量注册表中。可选的,在本申请实施例中一个基础模型对应着一个变量注册表。Among them, the model construction information refers to the information input by the user for building the model, including the model identification of at least one basic model and the variable identification of the variables of each basic model. It should be noted that in the embodiment of the present application, the basic model includes multiple variables, and at least one of the multiple variables can be obtained according to user needs. Therefore, the variables in the model building information are identified as at least one. The variable registration table includes at least one variable registration item, and the variable registration item is used to describe the variable. The variable registry refers to a table of pre-stored variables of the basic model. The variable registry includes variable identifiers and variable registration items corresponding to the variable identifiers. Variable identification can be variable name, variable number, etc. Variable registration items refer to the content describing variables, and the information of each variable in the basic model is stored in the corresponding variable registration table. Optionally, in the embodiment of this application, a basic model corresponds to a variable registry.
具体的,获取模型构建信息中的至少一个基础模型的模型标识和每个基础模型对应的变量标识。预先存储有基础模型,基于模型标识可以从存储基础模型的模型存储区中调取与模型标识对应的基础模型。基于至少一个变量标识从基础模型对应的变量注册表中调取与至少一个变量标识一一对应的变量注册项。根据至少一个基础模型和基础模型的变量注册项描述源模型,对于源模型的描述,无需考虑神经网络模型后续运算的情况,用户只需要将需要描述的源模型以模型构建信息的方式表述出来即可,简化了用户的操作。示例性的,基础模型为一个神经元,包括两个变量,分别描述神经元的输入端口和输出端口,则根据神经元、输入端口和输出端口可以描述神经网络模型的源模型。需要说明的是,本步骤中的源模型是指根据基础模型和基础模型的变量注册项描述的模型。Specifically, the model identification of at least one basic model in the model construction information and the variable identification corresponding to each basic model are obtained. The basic model is stored in advance, and based on the model identifier, the basic model corresponding to the model identifier can be retrieved from the model storage area where the basic model is stored. Based on the at least one variable identifier, a variable registration item corresponding to the at least one variable identifier is retrieved from the variable registry corresponding to the basic model. Describe the source model based on at least one basic model and the variable registration items of the basic model. For the description of the source model, there is no need to consider the subsequent operation of the neural network model. The user only needs to express the source model that needs to be described in the form of model construction information. Yes, simplifying user operations. For example, the basic model is a neuron, including two variables that describe the input port and the output port of the neuron respectively. Then the source model of the neural network model can be described based on the neuron, the input port, and the output port. It should be noted that the source model in this step refers to the model described based on the base model and the variable registration items of the base model.
通过本申请实施例的技术方案,只需要在接收到模型构建信息时,获取模型构建信息中的基础模型的模型标识和基础模型的变量的变量标识,就可以根据模型标识快速的调取基础模型,并根据变量标识快速调取基础模型的变量注册表中的变量注册项。由此,后续就可以根据至少一个基础模型和基础模型的变量注册项,快速的描述源模型。在需要进行模型转换的情况下,将源模型转换为可执行模型,本申请实施例的技术方案简化了模型构建时的复杂度,提高了模型构建速度,进而提高了用户体验度。Through the technical solution of the embodiment of the present application, only when receiving the model construction information, the model identification of the basic model and the variable identification of the variables of the basic model in the model construction information are obtained, and the basic model can be quickly retrieved according to the model identification. , and quickly retrieve the variable registration items in the variable registry of the basic model based on the variable identification. As a result, the source model can be quickly described based on at least one basic model and the variable registration items of the basic model. When model conversion is required, the source model is converted into an executable model. The technical solutions of the embodiments of the present application simplify the complexity of model construction, improve the model construction speed, and thereby improve the user experience.
可选的,在需要进行模型转换的情况下,可以是指接收到用户输入的模型转换指令的情况下。Optionally, when model conversion is required, it may refer to the case where a model conversion instruction input by the user is received.
在另一本申请实施例中,在所述模型构建信息中还包括变量的至少一个目标变量注册子项的情况下,所述方法还包括:获取所述变量的至少一个目标变量注册子项;所述基于至少一个所述变量标识,从与基础模型对应的变量注册表中调取与至少一个所述变量标识对应的变量注册项之后,还包括:检测所述变量注册项是否存在与目标变量注册子项相对应的初始变量注册子项;所述变量注册项中包括至少一个初始变量注册子项,所述初始变量注册子项包括变量类型和数据类 型的至少一项;若是,基于目标变量注册子项更新所述初始变量注册子项,得到新的变量注册项,若否,在所述变量注册项增加所述至少一个目标变量注册子项,得到新的变量注册项。In another embodiment of the present application, in the case where the model construction information also includes at least one target variable registration sub-item of a variable, the method further includes: obtaining at least one target variable registration sub-item of the variable; After retrieving the variable registration item corresponding to the at least one variable identifier from the variable registration table corresponding to the basic model based on the at least one variable identifier, the method further includes: detecting whether the variable registration item exists and matches the target variable. Initial variable registration sub-item corresponding to the registration sub-item; the variable registration item includes at least one initial variable registration sub-item, and the initial variable registration sub-item includes variable type and data class At least one item of the type; if yes, update the initial variable registration subitem based on the target variable registration subitem to obtain a new variable registration item; if not, add the at least one target variable registration subitem to the variable registration item, Get a new variable registry entry.
其中,变量注册项包括多个初始变量注册子项,初始变量注册子项可以是变量类型、数量类型、是否可持久化、是否共享等。变量类型包括单变量、张量变量等。数据类型是指与变量类型对应的数据的类型,比如,单变量的数据类型为数值,张量变量的数据类型为多维数组等。是否持久化包括该变量是否在源模型中始终不变,是否共享包括变量是否共享给其他的模型。Among them, the variable registration items include multiple initial variable registration sub-items. The initial variable registration sub-items can be variable type, quantity type, whether it can be persisted, whether it can be shared, etc. Variable types include single variables, tensor variables, etc. The data type refers to the type of data corresponding to the variable type. For example, the data type of a single variable is a numeric value, the data type of a tensor variable is a multi-dimensional array, etc. Whether to persist includes whether the variable remains unchanged in the source model, and whether to share includes whether the variable is shared with other models.
具体的,在获取了模型构建信息的目标变量注册子项后,检测变量的初始变量注册项中是否存在与目标变量注册子项相对应的初始变量注册子项,若是,基于目标变量注册子项更新初始变量注册子项,得到新的变量注册项。若否,在变量注册项中增加目标变量注册子项,得到新的变量注册项。通过本方法,可实现用户对现有的基础模型的变量进行调整,以得到适合构建的神经网络模型的基础模型,进而提高了神经网络模型构建的灵活度。Specifically, after obtaining the target variable registration sub-item of the model construction information, it is detected whether there is an initial variable registration sub-item corresponding to the target variable registration sub-item in the initial variable registration item of the variable. If so, based on the target variable registration sub-item Update the initial variable registration subkey and obtain a new variable registration key. If not, add the target variable registration subkey to the variable registration key to obtain a new variable registration key. Through this method, the user can adjust the variables of the existing basic model to obtain a basic model suitable for constructing a neural network model, thereby improving the flexibility of neural network model construction.
在另一本申请实施例中,在本申请实施例中,存储在模型存储区中的基础模型可以是一类具有相同变量数量的模型的统称,比如,神经元模型对应的变量注册表中包括三个变量,而在实际调取该神经元模型时,可以调取其中的两个变量,或者,可以调取其中的一个变量,这样的话,当调取出两个变量时,基于神经元模型和两个变量描述第一神经网络模型,当调取出一个变量时,基于该神经元模型和一个变量描述出第二神经网络模型。应当理解,这里的第一神经网络模型和第二神经网络模型是不同的。这样存储的基础模型和基础模型的变量注册表,可以减少资源占用。In another embodiment of the present application, in the embodiment of the present application, the basic model stored in the model storage area may be a collective name for a class of models with the same number of variables. For example, the variable registry corresponding to the neuron model includes Three variables, and when actually calling the neuron model, you can call two of the variables, or you can call one of the variables. In this case, when the two variables are called, based on the neuron model The first neural network model is described with two variables. When a variable is retrieved, the second neural network model is described based on the neuron model and one variable. It should be understood that the first neural network model and the second neural network model here are different. The basic model and the variable registry of the basic model stored in this way can reduce resource usage.
在另一本申请实施例中,所述至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型,包括:暂存所述基础模型和所述基础模型对应的所述变量注册项,以得到源模型。In another embodiment of the present application, obtaining the source model based on at least the basic model and the variable registration items corresponding to the basic model includes: temporarily storing the basic model and the variable registration items corresponding to the basic model. The variable registration key to get the source model.
本申请实施例中,暂时存储至少一个基础模型和基础模型对应的至少一个变量注册项,用以描述神经网络模型,也即得到源模型。以便在进行源模型转换时,可以根据存储的基础模型和变量注册项对源模型进行转换。需要说明的是,在模型描述阶段,只需要存储基于模型标识调取的基础模型,和基于变量标识调取的变量注册项即可,方便用户操作,并且,也提高了神经网络模型描述的效率。In the embodiment of the present application, at least one basic model and at least one variable registration item corresponding to the basic model are temporarily stored to describe the neural network model, that is, to obtain the source model. So that when converting the source model, the source model can be converted based on the stored basic model and variable registration items. It should be noted that in the model description stage, only the basic model retrieved based on the model identifier and the variable registration items retrieved based on the variable identifier need to be stored, which facilitates user operation and also improves the efficiency of neural network model description. .
在另一本申请实施例中,所述同步填充方式即在描述变量待填充内容时随即进行填充,包括:如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。In another embodiment of the present application, the synchronous filling method is to fill in the variables immediately when the content to be filled is described, including: allocating storage space if the variables of the basic model and/or the first model have not yet been allocated storage space. ; Based on the content of the variable to be filled, obtain the data value to be filled, and fill in the variables of the basic model and/or the first model.
在另一本申请实施例中,所述异步填充方式即在描述变量待填充内容之后的任一时刻进行填充,包括:如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。In another embodiment of the present application, the asynchronous filling method is to fill in any moment after describing the content of the variables to be filled, including: if the variables of the basic model and/or the first model have not yet allocated storage space, then Allocate storage space; based on the content of the variable to be filled, obtain the data value to be filled, and fill the variables of the basic model and/or the first model.
在另一本申请实施例中,所述方法还包括:采用同步填充方式对所述基础模型和/或第一模型的变量进行填充,或者采用异步填充方式对所述基础模型和/或第一模型的变量进行填充。In another embodiment of the present application, the method further includes: using a synchronous filling method to fill in the variables of the basic model and/or the first model, or using an asynchronous filling method to fill in the basic model and/or the first model. The variables of the model are filled in.
在一种实施例中,所述模型描述信息包括变量待填充内容。In one embodiment, the model description information includes content to be filled in variables.
在一种实施例中,所述变量填充器可以根据指定的变量待填充内容和/或指定的填充方式生成待填充数据值。所述变量待填充内容、填充方式都是相对更抽 象的上位概念,而待填充数据值是具体的。In one embodiment, the variable filler can generate the data value to be filled according to the specified content of the variable to be filled and/or the specified filling method. The content and filling method of the variables to be filled are relatively simple. The upper concept of an object, while the data value to be filled is specific.
在一种可能的实现方式,指定填充方式包括同步填充方式和/或异步填充方式。其中,同步填充方式是指确定了指定变量的变量待填充内容时,系统便为指定变量分配存储空间(若已获分配存储空间则无需再次分配),并进行填充;异步填充方式则是指确定了指定变量的变量待填充内容时,不会立即填充,而是在更晚的时候(例如模型编译阶段)给指定变量分配存储空间后(若已获分配存储空间则无需再次分配)方才进行填充。从存储空间分配时机角度,同步填充方式下立即分配存储空间,而异步填充方式下可以延迟分配存储空间。以异步填充方式为例,声明一个变量时,可能尚未为该变量实际分配存储空间,但是可以在声明该变量的API中指定变量填充器和/或填充方式,即确定了变量待填充内容,当该变量获得分配存储空间时,再进行填充,有利于使源模型与硬件细节解耦。In a possible implementation, the specified filling method includes a synchronous filling method and/or an asynchronous filling method. Among them, the synchronous filling method means that when the variable to be filled in the specified variable is determined, the system allocates storage space for the specified variable (if the storage space has been allocated, there is no need to allocate it again) and fills it; the asynchronous filling method refers to determining When a variable with a specified variable is to be filled, it will not be filled immediately, but will be filled in later (such as the model compilation stage) after the storage space is allocated to the specified variable (if the storage space has been allocated, there is no need to allocate it again) . From the perspective of storage space allocation timing, storage space is allocated immediately in synchronous filling mode, while storage space can be allocated delayed in asynchronous filling mode. Taking the asynchronous filling method as an example, when declaring a variable, the storage space may not be actually allocated for the variable, but the variable filler and/or filling method can be specified in the API where the variable is declared, that is, the content to be filled in the variable is determined. This variable is filled when the storage space is allocated, which helps decouple the source model from hardware details.
本申请实施例中,通过同步填充方式或者异步填充方式进行变量的填充,可以根据系统在对变量进行填充时的实际情况进行适应性的改变。通过同步填充方式或者异步填充方式对变量进行填充,提高了变量填充的灵活性。In the embodiment of the present application, variables are filled in a synchronous filling method or an asynchronous filling method, and adaptive changes can be made according to the actual situation of the system when filling variables. Filling variables through synchronous filling or asynchronous filling improves the flexibility of variable filling.
比如,基础模型中的变量为单变量,则在模型描述阶段,可以对基础模型和/或第一模型的变量进行待填充数据值的赋值。再如,在得到可执行模型并且完成了初始化后,或者,运行了可执行模型后,接收到用户的变量更新的待填充数据值,则将待填充数据值直接填充到已经分配了存储空间的基础模型和/或第一模型的变量中。For example, if the variables in the basic model are single variables, then in the model description stage, data values to be filled can be assigned to the variables of the basic model and/or the first model. For another example, after the executable model is obtained and the initialization is completed, or after the executable model is run, the user's variable updated data value to be filled is received, and the data value to be filled is directly filled into the allocated storage space. in the variables of the base model and/or the first model.
数据值包括数据类型对应的具体的值。比如,张量变量的数量类型为多维数组,数据值是指多维数组的具体数据值。应当理解,本申请实施例中的变量注册项中的数据类型是指多维数组、数值、字符串等,当然,数据类型中包括具体的数据值,比如,数据类型为数值,具体数值为2。当然,数据值不局限于数据类型对应的值,用户可以根据实际情况对变量注册项中的变量注册子项进行增加和删减,或者对第一模型的变量进行调整等。所以,数据值也会发生相应的变化。本申请实施例中的存储空间可以是GPU、CPU等的内存空间。Data values include specific values corresponding to data types. For example, the quantity type of a tensor variable is a multi-dimensional array, and the data value refers to the specific data value of the multi-dimensional array. It should be understood that the data type in the variable registration item in the embodiment of this application refers to multi-dimensional arrays, numerical values, strings, etc. Of course, the data type includes specific data values. For example, the data type is numerical value, and the specific numerical value is 2. Of course, the data value is not limited to the value corresponding to the data type. The user can add or delete the variable registration sub-items in the variable registration item according to the actual situation, or adjust the variables of the first model, etc. Therefore, the data values will also change accordingly. The storage space in the embodiment of this application may be the memory space of a GPU, CPU, etc.
需要说明的是,本申请实施例中的基础模型包括至少一个变量,若是某个基础模型包括了张量变量和单变量,该基础模型根据张量变量进行存储空间分配,并进行待填充数据值的填充,并且,调取单变量的待填充数据值,完成该基础模型的初始化。同理,第一模型与基础模型的上述操作相同,这里不再赘述。It should be noted that the basic model in the embodiment of the present application includes at least one variable. If a certain basic model includes tensor variables and single variables, the basic model allocates storage space according to the tensor variable and performs data value to be filled. Filling, and calling the univariate data value to be filled, completing the initialization of the basic model. In the same way, the above operations of the first model and the basic model are the same and will not be described again here.
在另一本申请实施例中,所述变量注册项包括多个变量注册子项,所述张量变量的所述变量注册子项中的待填充数据值包括多维数组;所述按照所述变量对应的变量注册项,调用所述待填充数据值对已经分配有存储空间的基础模型和/或第一模型的变量进行填充,包括:在基础模型的变量类型为张量变量的情况下,按照变量注册子项中的多维数组,对基础模型进行存储空间的分配,并将分配了存储空间的基础模型进行多维数组的填充。In another embodiment of the present application, the variable registration item includes multiple variable registration sub-items, and the data values to be filled in the variable registration sub-items of the tensor variable include multi-dimensional arrays; according to the variable The corresponding variable registration item calls the data value to be filled to fill the variables of the basic model and/or the first model that have been allocated storage space, including: when the variable type of the basic model is a tensor variable, according to The multi-dimensional array in the variable registration sub-item allocates storage space to the basic model, and fills the multi-dimensional array with the basic model allocated storage space.
本申请实施例中,在基础模型的变量类型为张量变量的情况下,按照变量注册子项中的多维数组,对基础模型进行存储空间的分配,并将分配了存储空间的基础模型进行多维数组的填充,通过这种填充方式可以为张量变量进行多维数组的填充,实现在可执行模型运行前的准备工作。针对多维数组对基础模型进行存储空间的分配,保证了存储空间分配的合理性。In the embodiment of the present application, when the variable type of the basic model is a tensor variable, the storage space is allocated to the basic model according to the multi-dimensional array in the variable registration sub-item, and the basic model allocated the storage space is multi-dimensional. Array filling, through this filling method, tensor variables can be filled into multi-dimensional arrays to achieve preparation before running the executable model. Allocate storage space to the basic model for multi-dimensional arrays to ensure the rationality of storage space allocation.
在另一本申请实施例中,所述将分配了存储空间的基础模型进行多维数组的填充,包括:通过常量填充、拷贝填充、均匀随机填充、正态随机填充和局部卷积填充中的至少一种变量填充方式对基础模型进行多维数组进行填充。 In another embodiment of the present application, the basic model with allocated storage space is filled with a multi-dimensional array, including: using at least one of constant filling, copy filling, uniform random filling, normal random filling and local convolution filling. A variable filling method fills multi-dimensional arrays in the basic model.
在另一本申请实施例中,所述将分配了存储空间的基础模型进行多维数组的填充,包括:通过变量填充器对分配了存储空间的基础模型进行多维数组的填充。In another embodiment of the present application, filling the multi-dimensional array of the basic model allocated with storage space includes: filling the multi-dimensional array with the basic model allocated with storage space through a variable filler.
本申请实施例中,预先设置了变量填充器,变量填充器可以根据指定方式合作或者默认方式进行变量的填充,在这里为多维数组的填充。通过变量填充器对分配了存储空间的基础模型进行多维数组的填充。In the embodiment of this application, a variable filler is preset, and the variable filler can cooperate according to a specified method or a default method to fill variables, here it is the filling of multi-dimensional arrays. The basic model with allocated storage space is filled with multi-dimensional arrays through variable fillers.
可选的,本申请实施例中的变量填充器可以根据用户指定的数值区间,对基础模型的变量进行随机数值的填充,也即用户在输入模型构建信息中,不仅输入了变量标识,也输入了变量的变量注册子项,对变量注册子项中的内容进行限定或者更新。在进行待填充数据值的填充时,可以根据变量注册子项中的具体待填充数据值或者数值区间对基础模型进行待填充数据值的填充。Optionally, the variable filler in the embodiment of the present application can fill in the variables of the basic model with random values according to the value interval specified by the user. That is, when the user inputs the model construction information, he not only inputs the variable identifier, but also inputs The variable registration subkey of the variable is specified, and the content in the variable registration subkey is limited or updated. When filling the data values to be filled, the data values to be filled can be filled in the basic model according to the specific data values to be filled or the numerical range in the variable registration sub-item.
在另一本申请实施例中,在所述模型描述信息为基础模型,并在从所述模型构建信息中获取到多个基础模型的模型标识的情况下,所述方法还包括:获取各个基础模型之间的拓扑结构信息;所述至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型,包括:基于各个基础模型、每个基础模型对应的变量注册项以及拓扑结构信息得到所述源模型。In another embodiment of the present application, when the model description information is a basic model, and the model identifiers of multiple basic models are obtained from the model construction information, the method further includes: obtaining each basic model. Topological structure information between models; the source model is obtained based on at least the basic model and the variable registration items corresponding to the basic model, including: based on each basic model and the variable registration items corresponding to each basic model and topological structure information to obtain the source model.
本申请实施例中,拓扑结构信息用于描述基础模型之间的连接方式,基础模型之间数据的传输方式,数据的格式等。通过拓扑结构信息可以将独立的基础模型连接起来。具体的,在从模型构建信息中获取到多个基础模型的模型标识,并获取各个基础模型之间的拓扑结构信息。基于各个基础模型,每个基础模型对应的变量注册项以及各个基础模型之间的拓扑结构信息,描述神经网络模型,也即得到源模型。通过本方法可以得到各种不同框架、不同结构的源模型。In the embodiment of this application, the topological structure information is used to describe the connection method between basic models, the data transmission method between basic models, the data format, etc. Independent base models can be connected through topology information. Specifically, model identifiers of multiple basic models are obtained from the model construction information, and topological structure information between each basic model is obtained. Based on each basic model, the variable registration items corresponding to each basic model and the topological structure information between each basic model, the neural network model is described, that is, the source model is obtained. Through this method, source models of various frameworks and structures can be obtained.
在另一本申请实施例中,所述拓扑结构信息包括端口信息和/或数据传输的模型信息;模型信息包括所述基础模型的输入模型信息和输出模型信息中的至少一个项;若基础模型为端口模型,则拓扑结构信息包括端口信息;若基础模型为容器模型,则拓扑结构信息包括所述模型信息。In another embodiment of the present application, the topology information includes port information and/or model information of data transmission; the model information includes at least one item of the input model information and the output model information of the basic model; if the basic model If it is a port model, the topology information includes port information; if the basic model is a container model, the topology information includes the model information.
本申请实施例中,端口模型包括端口和模型主体,端口模型可以是指具有端口的基础模型。在本申请实施例中模型主体可以是指神经元、突触、神经元组、突触组等。端口包括输入端口、输出端口、引用端口、连接端口等。端口信息用于描述基础模型之间的连接方式,比如基础模型A的输出端口连接基础模型B的输入端口。端口信息包括输入端口信息、输出端口信息、引用端口信息和连接端口信息中的至少一项。引用端口提供给端口模型的一种引用其它端口模型变量的机制,双方具有严格的绑定关系。引用端口用于在至少两个端口模型对象间共享信息。连接端口是一种模型管理接口,绑定到连接模型。连接端口用于将其它端口模型动态绑定到另一个端口模型。容器模型包括将一个或者多个组成部分放置在一个容器中。比如,将一个或者多个神经元放置在一个容器中,得到容器1,将容器1以及多个神经元放置在容器3中。将容器1和容器3放置在容器4中等。组成部分可以是单个的神经元,也可以是容器等。模型信息用于确定输入模型和输出模型,输入模型信息可以是输入模型的标识,以确定对应的输入模型,输出模型信息也可以是输出模型的标识,以确定输出模型。可选地,预先在容器模型中设置了输入模型的模型类型和输出模型的模型类型。示例性的,当容器模型A的输入模型的模型类型,与容器模型C的输出模型类型的模型类型相同时,可以将二者连接。In the embodiment of this application, the port model includes a port and a model body, and the port model may refer to a basic model with ports. In the embodiment of this application, the model subject may refer to neurons, synapses, neuron groups, synapse groups, etc. Ports include input ports, output ports, reference ports, connection ports, etc. Port information is used to describe the connection method between basic models. For example, the output port of basic model A is connected to the input port of basic model B. The port information includes at least one of input port information, output port information, reference port information and connection port information. Reference ports provide a mechanism for port models to reference variables of other port models, and the two parties have a strict binding relationship. Reference ports are used to share information between at least two port model objects. A connection port is a model management interface that is bound to a connection model. Connection ports are used to dynamically bind other port models to another port model. The container model involves placing one or more components in a container. For example, place one or more neurons in a container to obtain container 1, and place container 1 and multiple neurons in container 3. Place container 1 and container 3 in container 4 and so on. A component can be a single neuron or a container. The model information is used to determine the input model and the output model. The input model information can be the identifier of the input model to determine the corresponding input model. The output model information can also be the identifier of the output model to determine the output model. Optionally, the model type of the input model and the model type of the output model are set in the container model in advance. For example, when the model type of the input model of container model A is the same as the model type of the output model type of container model C, the two can be connected.
具体的,本申请实施例中,在基础模型为端口模型的情况下,获取端口模型的端口信息,在基础模型为容器模型的情况下,获取模型类型。通过确定端口模 型和容器模型的拓扑结构,实现通过多个基础模型描述源模型。需要说明的是,当容器模型设置了输入端口和输出端口的时候,此时的容器模型可以是指端口模型。Specifically, in the embodiment of the present application, when the basic model is a port model, the port information of the port model is obtained, and when the basic model is a container model, the model type is obtained. By determining the port mode The topology of type and container models enables describing the source model through multiple base models. It should be noted that when the container model sets input ports and output ports, the container model at this time can refer to the port model.
可选的,对于端口模型而言,可以通过端口模型范式来描述源模型。端口模型描述范式包括端口模型类、端口模型模板中的至少一种,以基于端口模型类、端口模型模板中的至少一种端口模型描述范式确定端口模型。端口模型描述范式,是指将基础模型的一至多个组成部分安排在一至多个端口模型中,端口模型之间可以通过一至多个端口进行关联,以便于变量引用或共享,形成嵌套、级联、循环等组织方式。此种方式下,信息流向更加清晰,模型组织形式更加灵活,模块化程度更好,更易于不同合作者之间进行合作开发,将各自的模型按照一定规范形成模块,进一步组织成更大的模型,并且用户不必关注硬件底层细节。以端口模型类确定端口模型举例说明,对于神经元来说,基于端口模型类便能够衍生得到神经元端口模型,该神经元端口模型中的端口至少包括输入端口、输出端口,其模型主体配置为漏积分函数、单变量作为神经元的阈值、单变量作为神经元的膜电位,以及配置输入端口接受一至多个神经元的输入、输出端口连接至一至多个神经元。Optionally, for the port model, the source model can be described through the port model paradigm. The port model description paradigm includes at least one of a port model class and a port model template, so as to determine the port model based on at least one of the port model description paradigms of the port model class and the port model template. The port model description paradigm refers to arranging one or more components of the basic model into one or more port models. Port models can be associated through one or more ports to facilitate variable reference or sharing, forming nested, hierarchical Organizational methods such as connections and cycles. In this way, the information flow is clearer, the model organization form is more flexible, and the degree of modularization is better. It is easier for different partners to cooperate and develop, and their respective models can be formed into modules according to certain specifications, and further organized into larger models. , and users do not have to pay attention to the underlying details of the hardware. Taking the port model class to determine the port model as an example, for neurons, the neuron port model can be derived based on the port model class. The ports in the neuron port model include at least input ports and output ports, and the main body of the model is configured as The leaky integral function, a single variable as the threshold of the neuron, the single variable as the membrane potential of the neuron, and the input port is configured to accept the input of one or more neurons, and the output port is connected to one or more neurons.
可选的,对于容器模型,基于容器模型、变量注册项以及拓扑结构信息,描述源模型,可以采用容器模型范式描述源模型,即将基础模型的一至多个组成部分安排在一至多个容器中,通过容器进行模型的管理、调度。容器模型范式包括容器类、容器模板中的至少一种,以基于容器类、容器模板中的至少一种容器模型描述范式,形成位于不同层次的容器模型。容器间可以形成级联、树状、扁平状、嵌套等组织形式。容器模型包括节点容器,也即神经元容器,根据变量对基础模型进行描述可以构建出节点容器,节点容器类型包括但不限于:神经元模型、突触模型和树突模型等。将创建的节点容器连接形成网络模型,也即源模型。Optionally, for the container model, the source model is described based on the container model, variable registration items and topology structure information. The container model paradigm can be used to describe the source model, that is, one or more components of the basic model are arranged in one or more containers. Model management and scheduling are performed through containers. The container model paradigm includes at least one of a container class and a container template. The paradigm is described based on at least one of the container class and the container template to form container models at different levels. Containers can form cascade, tree, flat, nested and other organizational forms. The container model includes node containers, that is, neuron containers. Node containers can be constructed by describing the basic model according to variables. The node container types include but are not limited to: neuron models, synapse models, dendrite models, etc. Connect the created node containers to form a network model, which is also the source model.
此种方式下,有利于实现任意颗粒度的源模型,更加有利于硬件底层关于源模型的转换,使得用户设计目标模型时,设计更符合硬件特性的操作,以便于后端部分能够更加合理地安排内存等硬件资源的调用。In this way, it is conducive to the realization of source models with arbitrary granularity, and is more conducive to the conversion of the source model at the bottom of the hardware, allowing users to design operations that are more in line with the hardware characteristics when designing the target model, so that the back-end part can be more reasonable. Arrange the call of hardware resources such as memory.
在一种可能的实现方式,网络拓扑结构包括但不限于:顺馈结构、反馈结构、跨层结构、侧向结构、循环结构、自循环结构、神经元与神经元直连结构、突触与突触直连结构、突触与树突直连结构。In a possible implementation, the network topology includes but is not limited to: feed-forward structure, feedback structure, cross-layer structure, lateral structure, loop structure, self-loop structure, neuron-to-neuron direct connection structure, synapse and Synaptic direct connection structure, synapse and dendrite direct connection structure.
在另一本申请实施例中,所述将所述源模型转换为可执行模型之后,还包括:接收到模型更新信息的情况下,基于模型更新信息更新所述源模型,得到新的源模型,并判定新的源模型与所述源模型中的各个基础模型和/或拓扑结构信息是否相同,若否,基于新的源模型各个基础模型和/或拓扑结构信息,得到对应的新的可执行模型。In another embodiment of the present application, after converting the source model into an executable model, the method further includes: when receiving model update information, updating the source model based on the model update information to obtain a new source model. , and determine whether the new source model is the same as each basic model and/or topological structure information in the source model. If not, obtain the corresponding new available model based on each basic model and/or topological structure information of the new source model. Execution model.
本申请实施例中的模型更新信息可以是对基础模型结构的更新,比如,在原有的基础模型的基础上,增加了一些神经元等,也可以是对基础模型的删减,比如,删除了源模型中的至少一个基础模型,还可以是对各个基础模型之间的拓扑结构的更新。比如,基础模型A与基础模型B连接,更新为基础模型A与基础模型C连接。具体的,在得到了可执行模型后,接收到模型更新信息,基于模型更新信息对源模型进行更新,得到新的源模型,并将在更新了源模型后,判断新的源模型中的各个基础模型和或者各个基础模型之间的拓扑结构是否发生改变,若是,则需要重新为各个基础模型分配内存空间,数据值的填充和/或数据值的调用等操作,得到新的可执行模型。本步骤可以提高模型构建的灵活性,用户若是 得到可执行模型后,发现效果不理想,可以实现对当前的源模型进行更新,并得到转换后的可执行模型,提高可执行模型的获取的灵活性。The model update information in the embodiment of the present application may be an update to the basic model structure, for example, adding some neurons to the original basic model, or it may be a deletion of the basic model, for example, deleting At least one base model in the source model may also be an update of the topology structure between the base models. For example, if basic model A is connected to basic model B, it is updated to be connected to basic model A and basic model C. Specifically, after obtaining the executable model, the model update information is received, the source model is updated based on the model update information, and a new source model is obtained. After the source model is updated, each element in the new source model is judged. Whether the basic model and/or the topological structure between each basic model has changed? If so, it is necessary to re-allocate memory space to each basic model, fill in data values and/or call data values, etc., to obtain a new executable model. This step can improve the flexibility of model construction. If the user After obtaining the executable model, it is found that the effect is not ideal. The current source model can be updated and the converted executable model can be obtained to improve the flexibility of obtaining the executable model.
在另一本申请实施例中,所述将所述源模型转换为可执行模型之后,还包括:当检测到接收的基础模型/第一模型的变量的更新信息时,基于变量的更新信息更新所述所述基础模型/第一模型中的变量,得到更新的基础模型/第一模型;所述更新信息包括增加变量、删减变量和更新变量的数据值中的至少一项。In another embodiment of the present application, after converting the source model into an executable model, the method further includes: when the update information of the variables of the received basic model/first model is detected, updating based on the update information of the variables. The variables in the basic model/first model are used to obtain an updated basic model/first model; the update information includes at least one of adding variables, deleting variables, and updating data values of variables.
其中,对于源模型来说,对于变量注册子项的更新,可以是对变量是否共享的调整,变量的数据类型的具体数据值的更新等。对变量的增加,在原来的基础模型的变量的基础上,增加了多个第一变量等。应当理解,若是增加了第一变量,更新信息中包括了基础模型的模型标识,基础模型中增加的第一变量的变量标识,以及第一变量对应的变量注册项。对变量的删减,可以是设置了删减标识符,当更新信息中存在某一变量标识以及删减标识符时,将基础模型中与变量标识对应的变量注册项删除。当然,对于第一模型也可以获取对于第一模型的变量的修改信息。Among them, for the source model, the update of the variable registration sub-item can be the adjustment of whether the variable is shared, the update of the specific data value of the variable's data type, etc. For the addition of variables, multiple first variables are added based on the variables of the original basic model. It should be understood that if the first variable is added, the update information includes the model identifier of the basic model, the variable identifier of the first variable added in the basic model, and the variable registration item corresponding to the first variable. To delete a variable, a deletion identifier can be set. When a certain variable identifier and a deletion identifier exist in the update information, the variable registration item corresponding to the variable identifier in the basic model is deleted. Of course, the modification information of the variables of the first model can also be obtained for the first model.
具体的,得到可执行模型后,检测到用户输入的任一变量的更新信息,基于更新信息更新基础模型中的变量,得到新的基础模型。比如,更新信息中包括任一变量的变量注册子项的更新,可以是更新基础模型中该变量的相对应的变量注册子项的数据值。应当理解,这里的数据值可以是指数据类型对应的具体数据值,也可以是指是否共享中的是Y或者F等,这里的Y表示是,F表示否。在得到可执行模型后,当检测到变量的更新信息时,可以对变量进行更新,并判断是否需要重新对基础模型分配存储空间,若是,则重新分配存储空间,并进行数据值的填充,再次转换。本步骤提高了神经网络模型构建的灵活性。可选的,也可以在源模型转换为可执行模型的过程中,接收用户的变量的更新信息。Specifically, after obtaining the executable model, the update information of any variable input by the user is detected, and the variables in the basic model are updated based on the update information to obtain a new basic model. For example, the update information includes the update of the variable registration sub-item of any variable, which may be to update the data value of the corresponding variable registration sub-item of the variable in the basic model. It should be understood that the data value here can refer to the specific data value corresponding to the data type, or whether the sharing is Y or F, etc., where Y here means yes, and F means no. After obtaining the executable model, when the update information of the variables is detected, the variables can be updated, and it can be determined whether the storage space needs to be re-allocated to the basic model. If so, the storage space will be reallocated and the data values will be filled in again. Convert. This step improves the flexibility of neural network model construction. Optionally, the user's variable update information can also be received during the process of converting the source model into an executable model.
在另一本申请实施例中,提供了一种模型构建装置,图2为本申请实施例提供的模型构建装置的结构示意图,本申请实施例所提供的模型构建装置可执行本申请任意实施例所提供的模型构建方法,具备执行方法相应的功能模块和有益效果。该装置包括:模型描述模块210和模型转换模块220;其中:In another embodiment of the present application, a model construction device is provided. Figure 2 is a schematic structural diagram of the model construction device provided by the embodiment of the present application. The model construction device provided by the embodiment of the present application can execute any embodiment of the present application. The provided model construction method has functional modules and beneficial effects corresponding to the execution method. The device includes: model description module 210 and model conversion module 220; wherein:
模型描述模块210,用于在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;The model description module 210 is used to obtain the source model of the neural network model based on the model description information during the model description stage. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/ Or the first model is used to build a neural network model; the first model is a user-defined model;
模型转换模块220,用于在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。The model conversion module 220 is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
进一步的,在本申请实施例中,所述模型转换模块还用于:Further, in the embodiment of this application, the model conversion module is also used to:
若所述模型描述信息为第一模型的信息,则编译所述第一模型,得到可执行模型,和/或若所述模型描述信息为基础模型的信息,则获取所述基础模型对应的可执行模型。If the model description information is the information of the first model, compile the first model to obtain an executable model, and/or if the model description information is the information of the basic model, obtain the executable model corresponding to the basic model. Execution model.
进一步的,在本申请实施例中,所述装置还包括:Further, in this embodiment of the application, the device further includes:
变量注册项获取模块,用于获取模型构建信息中的至少一个基础模型的模型标识,以及所述基础模型的至少一个变量的变量标识;基于所述模型标识,调取与所述模型标识对应的基础模型;基于至少一个所述变量标识,从与基础模型对应的变量注册表中调取与至少一个所述变量标识对应的变量注册项;所述变量注册表中包括至少一个变量注册项,所述变量注册项用于描述变量;A variable registration item acquisition module is used to obtain the model identifier of at least one basic model in the model construction information and the variable identifier of at least one variable of the basic model; based on the model identifier, retrieve the model identifier corresponding to the model identifier. Basic model; based on at least one of the variable identifiers, retrieve a variable registration item corresponding to at least one of the variable identifiers from the variable registration table corresponding to the basic model; the variable registration table includes at least one variable registration item, so The variable registration item is used to describe the variable;
所述模型描述模块210还用于:至少基于所述基础模型和所述基础模型对应 的所述变量注册项得到所述源模型。The model description module 210 is also configured to: based on at least the basic model and the corresponding The variable registration item obtains the source model.
进一步的,在本申请实施例中,所述装置还包括:Further, in this embodiment of the application, the device further includes:
变量填充模块,用于采用同步填充方式对所述基础模型和/或第一模型的变量进行填充,或者采用异步填充方式对所述基础模型和/或第一模型的变量进行填充。A variable filling module is used to fill in the variables of the basic model and/or the first model using a synchronous filling method, or to fill the variables of the basic model and/or the first model using an asynchronous filling method.
进一步的,在本申请实施例中,所述变量填充模块包括:同步填充子模块,用于在描述变量待填充内容时随即进行填充,同步填充子模块,还用于:如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。Further, in the embodiment of the present application, the variable filling module includes: a synchronous filling sub-module, which is used to fill in the variable immediately when describing the content to be filled, and a synchronous filling sub-module, which is also used to: if the basic model and /or the variables of the first model have not been allocated storage space, then allocate storage space; based on the content to be filled in the variables, obtain the data values to be filled, and fill the variables of the basic model and/or the first model.
进一步的,在本申请实施例中,所述变量填充模块包括:异步填充子模块,用于在描述变量待填充内容之后的任一时刻进行填充,异步填充子模块,还用于如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。Further, in the embodiment of the present application, the variable filling module includes: an asynchronous filling sub-module, used to fill at any time after describing the content of the variable to be filled, an asynchronous filling sub-module, also used to if the basic If the variables of the model and/or the first model have not yet been allocated storage space, allocate storage space; based on the content to be filled in the variables, obtain the data values to be filled, and fill the variables of the basic model and/or the first model.
进一步的,在本申请实施例中,所述变量注册项包括多个变量注册子项,所述张量变量的所述变量注册子项中的待填充数据值包括多维数组;Further, in this embodiment of the present application, the variable registration item includes multiple variable registration sub-items, and the data values to be filled in the variable registration sub-items of the tensor variable include multi-dimensional arrays;
所述变量填充模块还用于:在基础模型的变量类型为张量变量的情况下,按照变量注册子项中的多维数组,对基础模型进行存储空间的分配,并将分配了存储空间的基础模型进行多维数组的填充。The variable filling module is also used to: when the variable type of the basic model is a tensor variable, allocate storage space to the basic model according to the multi-dimensional array in the variable registration sub-item, and allocate the basis of the storage space. The model performs filling of multidimensional arrays.
进一步的,在本申请实施例中,所述变量填充模块还用于:Further, in the embodiment of this application, the variable filling module is also used to:
通过常量填充、拷贝填充、均匀随机填充、正态随机填充和局部卷积填充中的至少一种变量填充方式对基础模型进行多维数组进行填充。Fill the multi-dimensional array of the basic model through at least one variable filling method among constant filling, copy filling, uniform random filling, normal random filling and local convolution filling.
进一步的,在本申请实施例中,所述变量填充模块还用于:Further, in the embodiment of this application, the variable filling module is also used to:
通过变量填充器对分配了存储空间的基础模型进行多维数组的填充。The basic model with allocated storage space is filled with multi-dimensional arrays through variable fillers.
进一步的,在本申请实施例中,在所述模型描述信息为基础模型,并从所述模型构建信息中获取到多个基础模型的模型标识的情况下,所述装置还包括:Further, in the embodiment of the present application, when the model description information is a basic model, and the model identifiers of multiple basic models are obtained from the model construction information, the device further includes:
信息获取模块,用于获取各个基础模型之间的拓扑结构信息;The information acquisition module is used to obtain the topological structure information between each basic model;
所述模型描述模块210还用于:The model description module 210 is also used to:
基于各个基础模型、每个基础模型对应的变量注册项以及拓扑结构信息得到所述源模型。The source model is obtained based on each basic model, the variable registration items corresponding to each basic model, and the topological structure information.
进一步的,在本申请实施例中,所述拓扑结构信息包括端口信息和/或数据传输的模型信息;模型信息包括所述基础模型的输入模型信息和输出模型信息中的至少一个项;若基础模型为端口模型,则拓扑结构信息包括端口信息;若基础模型为容器模型,则拓扑结构信息包括所述模型信息。Further, in this embodiment of the present application, the topology information includes port information and/or model information of data transmission; the model information includes at least one of the input model information and the output model information of the basic model; if the basic If the model is a port model, the topology information includes port information; if the base model is a container model, the topology information includes the model information.
进一步的,在本申请实施例中,所述端口信息包括输入端口信息、输出端口信息、引用端口信息和连接端口信息中的至少一项。Further, in this embodiment of the present application, the port information includes at least one of input port information, output port information, reference port information and connection port information.
进一步的,在本申请实施例中,所述装置还包括:Further, in this embodiment of the application, the device further includes:
模型更新模块,用于接收到模型更新信息的情况下,基于模型更新信息更新所述源模型,得到新的源模型,并判定新的源模型与所述源模型中的各个基础模型和/或拓扑结构信息是否相同,若否,基于新的源模型各个基础模型和/或拓扑结构信息,得到对应的新的可执行模型。The model update module is used to update the source model based on the model update information when receiving the model update information, obtain a new source model, and determine whether the new source model is consistent with each basic model in the source model and/or Whether the topological structure information is the same, if not, the corresponding new executable model is obtained based on each basic model and/or topological structure information of the new source model.
进一步的,在本申请实施例中,所述装置还包括:Further, in this embodiment of the application, the device further includes:
变量更新模块,用于当检测到接收的基础模型/第一模型的变量的更新信息 时,基于变量的更新信息更新所述所述基础模型/第一模型中的变量,得到更新的基础模型/第一模型;所述更新信息包括增加变量、删减变量和更新变量的数据值中的至少一项。Variable update module, used when detecting the update information of the variables of the received basic model/first model When, the variables in the basic model/first model are updated based on the update information of the variables to obtain an updated basic model/first model; the update information includes data values of added variables, deleted variables and updated variables. at least one of.
进一步的,在本申请实施例中,所述模型描述模块210还用于:Further, in this embodiment of the present application, the model description module 210 is also used to:
暂存所述基础模型和所述基础模型对应的所述变量注册项,以得到所述源模型。Temporarily store the basic model and the variable registration items corresponding to the basic model to obtain the source model.
进一步的,在本申请实施例中,所述装置还包括:Further, in this embodiment of the application, the device further includes:
变量注册子项获取模块,用于获取所述变量的至少一个目标变量注册子项;A variable registration sub-item acquisition module, used to obtain at least one target variable registration sub-item of the variable;
变量注册项更新模块,用于检测所述变量注册项是否存在与目标变量注册子项相对应的初始变量注册子项;所述变量注册项中包括至少一个初始变量注册子项,所述初始变量注册子项包括变量类型和数据类型的至少一项;若是,基于目标变量注册子项更新所述初始变量注册子项,得到新的变量注册项,若否,在所述变量注册项增加所述至少一个目标变量注册子项,得到新的变量注册项。A variable registration item update module is used to detect whether the variable registration item has an initial variable registration sub-item corresponding to the target variable registration sub-item; the variable registration item includes at least one initial variable registration sub-item, and the initial variable The registration sub-item includes at least one of variable type and data type; if yes, update the initial variable registration sub-item based on the target variable registration sub-item to obtain a new variable registration item; if not, add the above-mentioned variable registration item to the variable registration item At least one target variable registration subkey is obtained, and a new variable registration key is obtained.
通过本申请实施例的技术方案,在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,模型描述数据包括第一模型和/或预先存储的基础模型的信息;基础模型和/或第一模型用于构建神经网络模型。第一模型为用户自定义的模型。在需要进行模型转换的情况下,进入模型转换阶段,将源模型转换为可执行模型。本申请实施例的技术方案简化了模型构建时的复杂度,提高了模型构建速度,进而提高了用户体验度。Through the technical solution of the embodiment of the present application, in the model description stage, the source model of the neural network model is obtained based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the third A model is used to build a neural network model. The first model is a user-defined model. When model conversion is required, enter the model conversion stage to convert the source model into an executable model. The technical solution of the embodiment of the present application simplifies the complexity of model construction, improves the model construction speed, and thereby improves user experience.
值得注意的是,上述装置所包括的各个模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能模块的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。It is worth noting that the various modules included in the above device are only divided according to functional logic, but are not limited to the above divisions, as long as they can achieve the corresponding functions; in addition, the specific names of each functional module are only for convenience The mutual distinction is not used to limit the scope of protection of the embodiments of the present application.
在另一本申请实施例中,提供了一种模型构建平台,图3为本申请实施例所提供的一种模型构建平台的结构示意图,所述平台用于在构建神经网络模型时,执行如上述任一实施例中的模型构建方法,所述平台包括:前端部分310、核心部分320和后端部分330,其中:In another embodiment of the present application, a model building platform is provided. Figure 3 is a schematic structural diagram of a model building platform provided by an embodiment of the present application. The platform is used to execute the following when building a neural network model: For the model building method in any of the above embodiments, the platform includes: a front-end part 310, a core part 320 and a back-end part 330, where:
所述前端部分310,用于代理所述平台外部与所述核心部分和/或所述后端部分进行交互;The front-end part 310 is used to interact with the core part and/or the back-end part on behalf of the outside of the platform;
所述核心部分320,用于响应所述前端部分和/或所述后端部分的请求,在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;The core part 320 is used to respond to requests from the front-end part and/or the back-end part. In the model description phase, obtain the source model of the neural network model based on the model description information. The model description data includes the first model. and/or pre-stored basic model information; the basic model and/or the first model are used to build a neural network model; the first model is a user-defined model;
所述后端部分330,用于在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。The backend part 330 is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
就前端部分310来说,系统外部(例如用户、其他系统)将通过前端部分310实现与平台的交互,以此调用平台的至少一种功能。比如,调取平台配置的模型。As for the front-end part 310, the outside of the system (such as users, other systems) will interact with the platform through the front-end part 310, thereby calling at least one function of the platform. For example, call the platform configuration model.
本申请实施例提供的前端部分310,可以实现接收用户输入的请求,可选地,可以显示用户所构建的神经网络模型,也可以显示神经网络模型的运行状态。核心部分320,基于模型描述信息得到源模型,后端部分330在需要进行模型转换的请况下,将源模型转换为可执行模型。本申请实施例的模型构建平台的前端部分310、核心部分320和后端部分330的分工明确,相互配合实现神经网络模型的构建,提高了构建的效率,并且由于核心部分320只是进行模型的描述,并不需要考虑模型转换的相关事宜,后端部分330将源模型转换为可执行模型,本申 请实施例的模型构建平台,方便用户操作,简化了模型构建的过程,降低了模型构建的复杂度,提高了用户体验度。The front-end part 310 provided by the embodiment of the present application can receive requests input by the user, optionally, can display the neural network model built by the user, and can also display the running status of the neural network model. The core part 320 obtains the source model based on the model description information, and the backend part 330 converts the source model into an executable model when model conversion is required. The front-end part 310, the core part 320 and the back-end part 330 of the model building platform in the embodiment of the present application have a clear division of labor and cooperate with each other to realize the construction of the neural network model, which improves the efficiency of the construction, and because the core part 320 only describes the model , there is no need to consider issues related to model conversion. The backend part 330 converts the source model into an executable model. This application The model construction platform of the embodiment is convenient for user operations, simplifies the process of model construction, reduces the complexity of model construction, and improves user experience.
后端部分的硬件设备包括但不限于GPU、TPU、神经拟态芯片、人工智能芯片等。The back-end hardware devices include but are not limited to GPU, TPU, neuromorphic chips, artificial intelligence chips, etc.
在另一本申请实施例中,提供了一种电子设备,图4为本申请实施例提供的一种电子设备的结构示意图。图4示出了适于用来实现本申请实施例实施方式的示例性电子设备50的框图。图4显示的电子设备50仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。In another embodiment of the present application, an electronic device is provided. FIG. 4 is a schematic structural diagram of an electronic device provided by this embodiment of the present application. 4 illustrates a block diagram of an exemplary electronic device 50 suitable for implementing embodiments of the present application. The electronic device 50 shown in FIG. 4 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present application.
如图4所示,电子设备50以通用计算设备的形式表现。电子设备50的组件可以包括但不限于:一个或者多个处理器或者处理单元501,系统存储器502,连接不同系统组件(包括系统存储器502和处理单元501)的总线503。As shown in Figure 4, electronic device 50 is embodied in the form of a general computing device. The components of the electronic device 50 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 connecting different system components (including the system memory 502 and the processing unit 501).
总线503表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。Bus 503 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect ( PCI) bus.
电子设备50典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备50访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Electronic device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 50, including volatile and nonvolatile media, removable and non-removable media.
系统存储器502可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)504和/或高速缓存存储器505。电子设备50可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统506可以用于读写不可移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线503相连。存储器502可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。System memory 502 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and/or cache memory 505 . Electronic device 50 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 506 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a disk drive may be provided for reading and writing to removable non-volatile disks (e.g., "floppy disks"), and for removable non-volatile optical disks (e.g., CD-ROM, DVD-ROM). or other optical media) that can read and write optical disc drives. In these cases, each drive may be connected to bus 503 through one or more data media interfaces. The memory 502 may include at least one program product having a set (eg, at least one) program module configured to perform the functions of various embodiments of the present application.
具有一组(至少一个)程序模块507的程序/实用工具508,可以存储在例如存储器502中,这样的程序模块507包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块507通常执行本申请所描述的实施例中的功能和/或方法。A program/utility 508 having a set of (at least one) program modules 507, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored, for example, in memory 502 , each of these examples or some combination may include the implementation of a network environment. Program modules 507 generally perform functions and/or methods in the embodiments described herein.
电子设备50也可以与一个或多个外部设备509(例如键盘、指向设备、显示器510等)通信,还可与一个或者多个使得用户能与该电子设备50交互的设备通信,和/或与使得该电子设备50能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等)通信。这种通信可以通过输入/输出(I/O)接口511进行。并且,电子设备50还可以通过网络适配器512与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器512通过总线503与电子设备50的其它模块通信。应当明白,尽管图4中未示出,可以结合电子设备50使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。 Electronic device 50 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with electronic device 50, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 50 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 511. Furthermore, the electronic device 50 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 512. As shown, network adapter 512 communicates with other modules of electronic device 50 via bus 503 . It should be understood that, although not shown in Figure 4, other hardware and/or software modules may be used in conjunction with electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tapes drives and data backup storage systems, etc.
处理单元501通过运行存储在系统存储器502中的程序,从而执行各种功能应用以及数据处理,例如实现本申请实施例所提供的模型构建方法。The processing unit 501 executes various functional applications and data processing by running programs stored in the system memory 502, for example, implementing the model building method provided by the embodiment of the present application.
在另一本申请实施例中,还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种模型构建方法,所述方法包括:In another embodiment of the present application, a storage medium containing computer-executable instructions is also provided. The computer-executable instructions, when executed by a computer processor, are used to perform a model construction method, and the method includes:
在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。In the model description stage, the source model of the neural network model is obtained based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the first model are For constructing a neural network model; the first model is a user-defined model; when model conversion is required, the model conversion stage is entered to convert the source model into an executable model.
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiment of the present application may be 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 is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections having one or more conductors, portable computer disks, hard drives, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. As used herein, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、RF等,或者上述的任意合适的组合。Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请实施例操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing operations of embodiments of the present application may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and combinations thereof, including Conventional procedural programming language - such as "C" or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。 What is disclosed above is only the preferred embodiment of the present application. Of course, it cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application still fall within the scope of the present application.

Claims (35)

  1. 一种模型构建方法,其特征在于,所述方法包括:A model building method, characterized in that the method includes:
    在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;In the model description stage, the source model of the neural network model is obtained based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or the first model are For constructing a neural network model; the first model is a user-defined model;
    在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。When model conversion is required, the model conversion stage is entered to convert the source model into an executable model.
  2. 根据权利要求1所述的模型构建方法,其特征在于,所述在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型,包括:The model construction method according to claim 1, characterized in that, when model conversion is required, entering the model conversion stage to convert the source model into an executable model includes:
    若所述模型描述信息为第一模型的信息,则编译所述第一模型,得到可执行模型,If the model description information is the information of the first model, compile the first model to obtain an executable model,
    和/或and / or
    若所述模型描述信息为基础模型的信息,则获取所述基础模型对应的可执行模型。If the model description information is information of a basic model, the executable model corresponding to the basic model is obtained.
  3. 根据权利要求2所述的模型构建方法,其特征在于,在所述模型描述信息为预先存储的源模型的信息的情况下,所述基于模型描述信息得到神经网络模型的源模型之前,还包括:The model construction method according to claim 2, characterized in that, in the case where the model description information is information of a pre-stored source model, before obtaining the source model of the neural network model based on the model description information, it further includes: :
    获取模型构建信息中的至少一个基础模型的模型标识,以及所述基础模型的至少一个变量的变量标识;Obtain the model identifier of at least one basic model in the model construction information, and the variable identifier of at least one variable of the basic model;
    基于所述模型标识,调取与所述模型标识对应的基础模型;Based on the model identifier, retrieve a basic model corresponding to the model identifier;
    基于至少一个所述变量标识,从与基础模型对应的变量注册表中调取与至少一个所述变量标识对应的变量注册项;所述变量注册表中包括至少一个变量注册项,所述变量注册项用于描述变量;Based on at least one of the variable identifiers, a variable registration item corresponding to at least one of the variable identifiers is retrieved from a variable registration table corresponding to the basic model; the variable registration table includes at least one variable registration item, and the variable registration item Terms are used to describe variables;
    所述基于模型描述信息得到神经网络模型的源模型,包括:The source model of the neural network model is obtained based on the model description information, including:
    至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型。The source model is obtained based on at least the basic model and the variable registration item corresponding to the basic model.
  4. 根据权利要求3所述的模型构建方法,其特征在于,所述方法还包括:The model construction method according to claim 3, characterized in that the method further includes:
    采用同步填充方式对所述基础模型和/或第一模型的变量进行填充,Use a synchronous filling method to fill in the variables of the basic model and/or the first model,
    或者or
    采用异步填充方式对所述基础模型和/或第一模型的变量进行填充。An asynchronous filling method is used to fill in the variables of the basic model and/or the first model.
  5. 根据权利要求4所述的模型构建方法,其特征在于,所述同步填充方式即在描述变量待填充内容时随即进行填充,包括:The model construction method according to claim 4, characterized in that the synchronous filling method is to fill in the variables immediately when the content to be filled is described, including:
    如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;If the variables of the base model and/or the first model have not yet been allocated storage space, allocate storage space;
    基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。Based on the content of the variable to be filled, the data value to be filled is obtained, and the variables of the basic model and/or the first model are filled.
  6. 根据权利要求4所述的模型构建方法,其特征在于,所述异步填充方式即在描述变量待填充内容之后的任一时刻进行填充,包括:The model construction method according to claim 4, characterized in that the asynchronous filling method is to fill in any moment after describing the content of the variable to be filled, including:
    如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;If the variables of the base model and/or the first model have not yet been allocated storage space, allocate storage space;
    基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。Based on the content of the variable to be filled, the data value to be filled is obtained, and the variables of the basic model and/or the first model are filled.
  7. 根据权利要求5所述的模型构建方法,其特征在于,所述变量注册项包括多个变量注册子项,所述张量变量的所述变量注册子项中的待填充数据值包括 多维数组;The model building method according to claim 5, wherein the variable registration item includes a plurality of variable registration sub-items, and the data values to be filled in the variable registration sub-items of the tensor variable include Multidimensional Arrays;
    调用所述待填充数据值对已经分配有存储空间的基础模型和/或第一模型的变量进行填充,包括:Calling the data value to be filled to fill the variables of the basic model and/or the first model that has been allocated storage space includes:
    在基础模型的变量类型为张量变量的情况下,按照变量注册子项中的多维数组,对基础模型进行存储空间的分配,并将分配了存储空间的基础模型进行多维数组的填充。When the variable type of the basic model is a tensor variable, the storage space is allocated to the basic model according to the multi-dimensional array in the variable registration sub-item, and the multi-dimensional array is filled in the basic model to which the storage space is allocated.
  8. 如权利要求7所述的模型构建方法,其特征在于,所述将分配了存储空间的基础模型进行多维数组的填充,包括:The model construction method according to claim 7, characterized in that filling the multi-dimensional array of the basic model allocated with storage space includes:
    通过常量填充、拷贝填充、均匀随机填充、正态随机填充和局部卷积填充中的至少一种变量填充方式对基础模型进行多维数组进行填充。Fill the multi-dimensional array of the basic model through at least one variable filling method among constant filling, copy filling, uniform random filling, normal random filling and local convolution filling.
  9. 根据权利要求7所述的模型构建方法,其特征在于,所述将分配了存储空间的基础模型进行多维数组的填充,包括:The model construction method according to claim 7, characterized in that filling the multi-dimensional array of the basic model allocated with storage space includes:
    通过变量填充器对分配了存储空间的基础模型进行多维数组的填充。The basic model with allocated storage space is filled with multi-dimensional arrays through variable fillers.
  10. 根据权利要求3所述的模型构建方法,其特征在于,在所述模型描述信息为基础模型,并从所述模型构建信息中获取到多个基础模型的模型标识的情况下,所述方法还包括:The model construction method according to claim 3, characterized in that when the model description information is a basic model and the model identifiers of multiple basic models are obtained from the model construction information, the method further include:
    获取各个基础模型之间的拓扑结构信息;Obtain topological structure information between each basic model;
    所述至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型,包括:Obtaining the source model based on at least the basic model and the variable registration items corresponding to the basic model includes:
    基于各个基础模型、每个基础模型对应的变量注册项以及拓扑结构信息得到所述源模型。The source model is obtained based on each basic model, the variable registration items corresponding to each basic model, and the topological structure information.
  11. 根据权利要求9所述的模型构建方法,其特征在于,所述拓扑结构信息包括端口信息和/或数据传输的模型信息;模型信息包括所述基础模型的输入模型信息和输出模型信息中的至少一个项;The model construction method according to claim 9, characterized in that the topological structure information includes port information and/or model information of data transmission; the model information includes at least one of the input model information and the output model information of the basic model. an item;
    若基础模型为端口模型,则拓扑结构信息包括端口信息;If the basic model is a port model, the topology information includes port information;
    若基础模型为容器模型,则拓扑结构信息包括所述模型信息。If the basic model is a container model, the topology information includes the model information.
  12. 根据权利要求11所述的模型构建方法,其特征在于,所述端口信息包括输入端口信息、输出端口信息、引用端口信息和连接端口信息中的至少一项。The model building method according to claim 11, characterized in that the port information includes at least one of input port information, output port information, reference port information and connection port information.
  13. 根据权利要求10所述的模型构建方法,其特征在于,所述将所述源模型转换为可执行模型之后,还包括:The model construction method according to claim 10, characterized in that after converting the source model into an executable model, it further includes:
    接收到模型更新信息的情况下,基于模型更新信息更新所述源模型,得到新的源模型,并判定新的源模型与所述源模型中的各个基础模型和/或拓扑结构信息是否相同,若否,基于新的源模型各个基础模型和/或拓扑结构信息,得到对应的新的可执行模型。When receiving model update information, update the source model based on the model update information, obtain a new source model, and determine whether the new source model is the same as each basic model and/or topology structure information in the source model, If not, a corresponding new executable model is obtained based on each basic model and/or topological structure information of the new source model.
  14. 根据权利要求1所述的模型构建方法,其特征在于,所述将所述源模型转换为可执行模型之后,还包括:The model construction method according to claim 1, characterized in that after converting the source model into an executable model, it further includes:
    当检测到接收的基础模型/第一模型的变量的更新信息时,基于变量的更新信息更新所述所述基础模型/第一模型中的变量,得到更新的基础模型/第一模型;所述更新信息包括增加变量、删减变量和更新变量的数据值中的至少一项。When the update information of the received variables of the basic model/first model is detected, updating the variables in the basic model/first model based on the update information of the variables to obtain an updated basic model/first model; The update information includes at least one of adding a variable, deleting a variable, and updating a data value of a variable.
  15. 根据权利要求3所述的模型构建方法,其特征在于,所述至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型,包括:The model construction method according to claim 3, wherein obtaining the source model based on at least the basic model and the variable registration items corresponding to the basic model includes:
    暂存所述基础模型和所述基础模型对应的所述变量注册项,以得到所述源模型。Temporarily store the basic model and the variable registration items corresponding to the basic model to obtain the source model.
  16. 根据权利要求3所述的模型构建方法,其特征在于,在所述模型构建信 息中还包括变量的至少一个目标变量注册子项的情况下,所述方法还包括:The model building method according to claim 3, characterized in that in the model building information If the information also includes at least one target variable registration subkey of the variable, the method further includes:
    获取所述变量的至少一个目标变量注册子项;Obtain at least one target variable registration subkey of the variable;
    所述基于至少一个所述变量标识,从与基础模型对应的变量注册表中调取与至少一个所述变量标识对应的变量注册项之后,还包括:After retrieving the variable registration item corresponding to the at least one variable identifier from the variable registry corresponding to the basic model based on the at least one variable identifier, the method further includes:
    检测所述变量注册项是否存在与目标变量注册子项相对应的初始变量注册子项;所述变量注册项中包括至少一个初始变量注册子项,所述初始变量注册子项包括变量类型和数据类型的至少一项;Detect whether there is an initial variable registration sub-item corresponding to the target variable registration sub-item in the variable registration item; the variable registration item includes at least one initial variable registration sub-item, and the initial variable registration sub-item includes variable type and data at least one of the types;
    若是,基于目标变量注册子项更新所述初始变量注册子项,得到新的变量注册项,If so, update the initial variable registration subkey based on the target variable registration subkey to obtain a new variable registration key,
    若否,在所述变量注册项增加所述至少一个目标变量注册子项,得到新的变量注册项。If not, add the at least one target variable registration sub-item to the variable registration item to obtain a new variable registration item.
  17. 一种模型构建装置,其特征在于,所述装置包括:A model building device, characterized in that the device includes:
    模型描述模块,用于在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;A model description module, used in the model description stage to obtain the source model of the neural network model based on the model description information. The model description data includes the first model and/or the information of the pre-stored basic model; the basic model and/or The first model is used to build a neural network model; the first model is a user-defined model;
    模型转换模块,用于在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。The model conversion module is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
  18. 根据权利要求17所述的模型构建装置,其特征在于,所述模型转换模块还用于:The model building device according to claim 17, characterized in that the model conversion module is also used to:
    若所述模型描述信息为第一模型的信息,则编译所述第一模型,得到可执行模型,和/或若所述模型描述信息为基础模型的信息,则获取所述基础模型对应的可执行模型。If the model description information is the information of the first model, compile the first model to obtain an executable model, and/or if the model description information is the information of the basic model, obtain the executable model corresponding to the basic model. Execution model.
  19. 根据权利要求18所述的模型构建装置,其特征在于,所述装置还包括:The model building device according to claim 18, characterized in that the device further includes:
    变量注册项获取模块,用于获取模型构建信息中的至少一个基础模型的模型标识,以及所述基础模型的至少一个变量的变量标识;基于所述模型标识,调取与所述模型标识对应的基础模型;基于至少一个所述变量标识,从与基础模型对应的变量注册表中调取与至少一个所述变量标识对应的变量注册项;所述变量注册表中包括至少一个变量注册项,所述变量注册项用于描述变量;A variable registration item acquisition module is used to obtain the model identifier of at least one basic model in the model construction information and the variable identifier of at least one variable of the basic model; based on the model identifier, retrieve the model identifier corresponding to the model identifier. Basic model; based on at least one of the variable identifiers, retrieve a variable registration item corresponding to at least one of the variable identifiers from the variable registration table corresponding to the basic model; the variable registration table includes at least one variable registration item, so The variable registration item is used to describe the variable;
    所述模型描述模块还用于:至少基于所述基础模型和所述基础模型对应的所述变量注册项得到所述源模型。The model description module is further configured to obtain the source model based on at least the basic model and the variable registration items corresponding to the basic model.
  20. 根据权利要求19所述的模型构建装置,其特征在于,所述装置还包括:The model building device according to claim 19, characterized in that the device further includes:
    变量填充模块,用于采用同步填充方式对所述基础模型和/或第一模型的变量进行填充,或者采用异步填充方式对所述基础模型和/或第一模型的变量进行填充。A variable filling module is used to fill in the variables of the basic model and/or the first model using a synchronous filling method, or to fill the variables of the basic model and/or the first model using an asynchronous filling method.
  21. 根据权利要求20所述的模型构建装置,其特征在于,所述变量填充模块包括:The model building device according to claim 20, wherein the variable filling module includes:
    同步填充子模块,用于在描述变量待填充内容时随即进行填充,The synchronous filling sub-module is used to fill in the variables immediately when describing the content to be filled.
    同步填充子模块,还用于:如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;The synchronous filling sub-module is also used to: allocate storage space if the variables of the basic model and/or the first model have not yet been allocated storage space;
    基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。Based on the content of the variable to be filled, the data value to be filled is obtained, and the variables of the basic model and/or the first model are filled.
  22. 根据权利要求20所述的模型构建装置,其特征在于,所述变量填充模块包括: The model building device according to claim 20, wherein the variable filling module includes:
    异步填充子模块,用于在描述变量待填充内容之后的任一时刻进行填充,The asynchronous filling sub-module is used to fill in any moment after describing the content of the variable to be filled.
    异步填充子模块,还用于如果所述基础模型和/或第一模型的变量尚未分配存储空间,则分配存储空间;The asynchronous filling sub-module is also used to allocate storage space if the variables of the basic model and/or the first model have not yet been allocated storage space;
    基于所述变量待填充内容,获取待填充数据值,对所述基础模型和/或第一模型的变量进行填充。Based on the content of the variable to be filled, the data value to be filled is obtained, and the variables of the basic model and/or the first model are filled.
  23. 根据权利要求20所述的模型构建装置,其特征在于,所述变量注册项包括多个变量注册子项,所述张量变量的所述变量注册子项中的待填充数据值包括多维数组;The model building device according to claim 20, wherein the variable registration item includes a plurality of variable registration sub-items, and the data values to be filled in the variable registration sub-items of the tensor variable include multi-dimensional arrays;
    所述变量填充模块还用于:在基础模型的变量类型为张量变量的情况下,按照变量注册子项中的多维数组,对基础模型进行存储空间的分配,并将分配了存储空间的基础模型进行多维数组的填充。The variable filling module is also used to: when the variable type of the basic model is a tensor variable, allocate storage space to the basic model according to the multi-dimensional array in the variable registration sub-item, and allocate the basis of the storage space. The model performs filling of multidimensional arrays.
  24. 根据权利要求23所述的模型构建装置,其特征在于,所述变量填充模块还用于:The model building device according to claim 23, characterized in that the variable filling module is also used to:
    通过常量填充、拷贝填充、均匀随机填充、正态随机填充和局部卷积填充中的至少一种变量填充方式对基础模型进行多维数组进行填充。Fill the multi-dimensional array of the basic model through at least one variable filling method among constant filling, copy filling, uniform random filling, normal random filling and local convolution filling.
  25. 根据权利要求23所述的模型构建装置,其特征在于,所述变量填充模块还用于:The model building device according to claim 23, characterized in that the variable filling module is also used to:
    通过变量填充器对分配了存储空间的基础模型进行多维数组的填充。The basic model with allocated storage space is filled with multi-dimensional arrays through variable fillers.
  26. 根据权利要求19所述的模型构建装置,其特征在于,在所述模型描述信息为基础模型,并从所述模型构建信息中获取到多个基础模型的模型标识的情况下,所述装置还包括:The model construction device according to claim 19, characterized in that, when the model description information is a basic model, and the model identifiers of multiple basic models are obtained from the model construction information, the device further include:
    信息获取模块,用于获取各个基础模型之间的拓扑结构信息;The information acquisition module is used to obtain the topological structure information between each basic model;
    所述模型描述模块还用于:The model description module is also used to:
    基于各个基础模型、每个基础模型对应的变量注册项以及拓扑结构信息得到所述源模型。The source model is obtained based on each basic model, the variable registration items corresponding to each basic model, and the topological structure information.
  27. 根据权利要求26所述的模型构建装置,其特征在于,所述拓扑结构信息包括端口信息和/或数据传输的模型信息;模型信息包括所述基础模型的输入模型信息和输出模型信息中的至少一个项;若基础模型为端口模型,则拓扑结构信息包括端口信息;若基础模型为容器模型,则拓扑结构信息包括所述模型信息。The model building device according to claim 26, wherein the topological structure information includes port information and/or model information of data transmission; the model information includes at least one of the input model information and the output model information of the basic model. An item; if the basic model is a port model, the topology information includes port information; if the basic model is a container model, the topology information includes the model information.
  28. 根据权利要求27所述的模型构建装置,其特征在于,所述端口信息包括输入端口信息、输出端口信息、引用端口信息和连接端口信息中的至少一项。The model building device according to claim 27, wherein the port information includes at least one of input port information, output port information, reference port information and connection port information.
  29. 根据权利要求26所述的模型构建装置,其特征在于,所述装置还包括:The model building device according to claim 26, characterized in that the device further includes:
    模型更新模块,用于接收到模型更新信息的情况下,基于模型更新信息更新所述源模型,得到新的源模型,并判定新的源模型与所述源模型中的各个基础模型和/或拓扑结构信息是否相同,若否,基于新的源模型各个基础模型和/或拓扑结构信息,得到对应的新的可执行模型。The model update module is used to update the source model based on the model update information when receiving the model update information, obtain a new source model, and determine whether the new source model is consistent with each basic model in the source model and/or Whether the topological structure information is the same, if not, the corresponding new executable model is obtained based on each basic model and/or topological structure information of the new source model.
  30. 根据权利要求17所述的模型构建装置,其特征在于,所述装置还包括:The model building device according to claim 17, characterized in that the device further includes:
    变量更新模块,用于当检测到接收的基础模型/第一模型的变量的更新信息时,基于变量的更新信息更新所述所述基础模型/第一模型中的变量,得到更新的基础模型/第一模型;所述更新信息包括增加变量、删减变量和更新变量的数据值中的至少一项。A variable update module, configured to update the variables in the basic model/first model based on the updated information of the variables when detecting the received update information of the variables of the basic model/first model, to obtain an updated basic model/ First model; the update information includes at least one of data values of added variables, deleted variables, and updated variables.
  31. 根据权利要求19所述的模型构建装置,其特征在于,所述模型描述模块210还用于:The model building device according to claim 19, characterized in that the model description module 210 is also used to:
    暂存所述基础模型和所述基础模型对应的所述变量注册项,以得到所述源模 型。Temporarily store the basic model and the variable registration items corresponding to the basic model to obtain the source model type.
  32. 根据权利要求19所述的模型构建装置,其特征在于,所述装置还包括:The model building device according to claim 19, characterized in that the device further includes:
    变量注册子项获取模块,用于获取所述变量的至少一个目标变量注册子项;A variable registration sub-item acquisition module, used to obtain at least one target variable registration sub-item of the variable;
    变量注册项更新模块,用于检测所述变量注册项是否存在与目标变量注册子项相对应的初始变量注册子项;所述变量注册项中包括至少一个初始变量注册子项,所述初始变量注册子项包括变量类型和数据类型的至少一项;若是,基于目标变量注册子项更新所述初始变量注册子项,得到新的变量注册项,若否,在所述变量注册项增加所述至少一个目标变量注册子项,得到新的变量注册项。A variable registration item update module is used to detect whether the variable registration item has an initial variable registration sub-item corresponding to the target variable registration sub-item; the variable registration item includes at least one initial variable registration sub-item, and the initial variable registration item The registration subitem includes at least one of a variable type and a data type; if yes, update the initial variable registration subitem based on the target variable registration subitem to obtain a new variable registration item; if not, add the above variable registration item to the variable registration item At least one target variable registration subkey is obtained, and a new variable registration key is obtained.
  33. 一种模型构建平台,其特征在于,所述平台执行如权利要求1-16的模型构建方法,所述平台包括:前端部分、核心部分和后端部分,其中:A model building platform, characterized in that the platform executes the model building method of claims 1-16, and the platform includes: a front-end part, a core part and a back-end part, wherein:
    所述前端部分,用于代理所述平台外部与所述核心部分和/或所述后端部分进行交互;The front-end part is used to interact with the core part and/or the back-end part on behalf of the outside of the platform;
    所述核心部分,用于响应所述前端部分和/或所述后端部分的请求,在模型描述阶段,基于模型描述信息得到神经网络模型的源模型,所述模型描述数据包括第一模型和/或预先存储的基础模型的信息;所述基础模型和/或所述第一模型用于构建神经网络模型;所述第一模型为用户自定义的模型;The core part is used to respond to requests from the front-end part and/or the back-end part. In the model description phase, obtain the source model of the neural network model based on the model description information. The model description data includes the first model and /or pre-stored basic model information; the basic model and/or the first model are used to build a neural network model; the first model is a user-defined model;
    所述后端部分,用于在需要进行模型转换的情况下,进入模型转换阶段,将所述源模型转换为可执行模型。The back-end part is used to enter the model conversion stage and convert the source model into an executable model when model conversion is required.
  34. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, characterized in that the electronic device includes:
    一个或多个处理器;one or more processors;
    存储装置,用于存储一个或多个程序,a storage device for storing one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-16中任一所述的模型构建方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the model building method as described in any one of claims 1-16.
  35. 一种包含计算机可执行指令的存储介质,其特征在于,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-16中任一所述的模型构建方法。 A storage medium containing computer-executable instructions, characterized in that, when executed by a computer processor, the computer-executable instructions are used to perform the model construction method according to any one of claims 1-16.
PCT/CN2023/116452 2022-09-02 2023-09-01 Model construction method, apparatus and platform, electronic device and storage medium WO2024046463A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211068160.0A CN117709402A (en) 2022-09-02 2022-09-02 Model construction method, device, platform, electronic equipment and storage medium
CN202211068160.0 2022-09-02

Publications (1)

Publication Number Publication Date
WO2024046463A1 true WO2024046463A1 (en) 2024-03-07

Family

ID=90100452

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/116452 WO2024046463A1 (en) 2022-09-02 2023-09-01 Model construction method, apparatus and platform, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN117709402A (en)
WO (1) WO2024046463A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150100529A1 (en) * 2013-10-08 2015-04-09 Qualcomm Incorporated Compiling network descriptions to multiple platforms
CN108182473A (en) * 2017-12-12 2018-06-19 中国科学院自动化研究所 Full-dimension distributed full brain modeling system based on class brain impulsive neural networks
CN110322010A (en) * 2019-07-02 2019-10-11 深圳忆海原识科技有限公司 The impulsive neural networks arithmetic system and method calculated for class brain intelligence with cognition
CN111222637A (en) * 2020-01-17 2020-06-02 上海商汤智能科技有限公司 Neural network model deployment method and device, electronic equipment and storage medium
CN112686375A (en) * 2021-01-07 2021-04-20 北京灵汐科技有限公司 Neural network model generation method and device
CN114757334A (en) * 2022-03-23 2022-07-15 河北工业大学 Model construction method and device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150100529A1 (en) * 2013-10-08 2015-04-09 Qualcomm Incorporated Compiling network descriptions to multiple platforms
CN108182473A (en) * 2017-12-12 2018-06-19 中国科学院自动化研究所 Full-dimension distributed full brain modeling system based on class brain impulsive neural networks
CN110322010A (en) * 2019-07-02 2019-10-11 深圳忆海原识科技有限公司 The impulsive neural networks arithmetic system and method calculated for class brain intelligence with cognition
CN111222637A (en) * 2020-01-17 2020-06-02 上海商汤智能科技有限公司 Neural network model deployment method and device, electronic equipment and storage medium
CN112686375A (en) * 2021-01-07 2021-04-20 北京灵汐科技有限公司 Neural network model generation method and device
CN114757334A (en) * 2022-03-23 2022-07-15 河北工业大学 Model construction method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN117709402A (en) 2024-03-15

Similar Documents

Publication Publication Date Title
US20220391771A1 (en) Method, apparatus, and computer device and storage medium for distributed training of machine learning model
US11010681B2 (en) Distributed computing system, and data transmission method and apparatus in distributed computing system
WO2021051914A1 (en) Gpu resource-based data processing method and system, and electronic device
Agha Actors: a model of concurrent computation in distributed systems
CN109669772B (en) Parallel execution method and equipment of computational graph
US11429434B2 (en) Elastic execution of machine learning workloads using application based profiling
US10469588B2 (en) Methods and apparatus for iterative nonspecific distributed runtime architecture and its application to cloud intelligence
WO2021259039A1 (en) Neural network model customization method, system and device, and storage medium
CN111708641B (en) Memory management method, device, equipment and computer readable storage medium
CN113821332B (en) Method, device, equipment and medium for optimizing efficiency of automatic machine learning system
US20240111586A1 (en) Multi-policy intelligent scheduling method and apparatus oriented to heterogeneous computing power
WO2024016596A1 (en) Container cluster scheduling method and apparatus, device, and storage medium
US20240004853A1 (en) Virtual data source manager of data virtualization-based architecture
US11080623B2 (en) Automated reinforcement-learning-based application manager that uses action tags and metric tags
CN108595331A (en) Test method, medium, device and the computing device of asynchronous interface
Narantuya et al. Multi-Agent Deep Reinforcement Learning-Based Resource Allocation in HPC/AI Converged Cluster.
Webb et al. Process networks as a high-level notation for metacomputing
Rossant et al. Playdoh: a lightweight Python library for distributed computing and optimisation
WO2024046463A1 (en) Model construction method, apparatus and platform, electronic device and storage medium
TWI770534B (en) Automatic machine learning system performance tuning method, device, electronic device and storage medium
CN111400300B (en) Edge equipment management method and device and management equipment
CN107368377A (en) Network request processing method and processing device in a kind of Android application programs
WO2024046458A1 (en) Hierarchical system, operation method and apparatus, and electronic device and storage medium
WO2024046459A1 (en) Model management apparatus and hierarchical system for neural network operation
US7756691B2 (en) Establishing relationships between components in simulation systems

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: 23859491

Country of ref document: EP

Kind code of ref document: A1