Method, device, electronic device and storage medium for generating a deep learning model
By constructing a deep learning model architecture that matches the computing power required by the model, and utilizing a model component library and sample dataset, deep learning models are automatically generated, solving the problem of low generation efficiency and achieving fast and efficient model generation and deployment.
Patent Information
- Application Number
- CN202210563774.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-05-23
AI Technical Summary
Current technologies for generating deep learning models are inefficient, requiring experienced algorithm engineers to repeatedly adjust the model structure, resulting in low generation efficiency and hindering online use of the models.
By constructing N deep learning model architectures that match the computing power required by the model, and utilizing multiple model components in the model component library, combined with the model task and sample dataset, N initial deep learning models are automatically generated, and finally the target deep learning model is obtained.
It improves the efficiency of deep learning model generation, reduces reliance on experienced algorithm engineers, simplifies the model building process, and facilitates rapid online deployment.
Smart Images

Figure CN115081613B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for generating deep learning models. Background Technology
[0002] Deep learning is a machine learning method based on neural network models, widely used in fields such as intelligent assisted driving, intelligent robots, and intelligent security. Among these, object detection, image classification, and behavior recognition are key areas in visual tasks, and current development efforts for these tasks mainly focus on generating deep learning models.
[0003] To generate high-performing deep learning models, experienced algorithm engineers are required to build the model structure and then repeatedly adjust it, a process that is time-consuming. Therefore, the generation efficiency of deep learning models is relatively low, hindering their online deployment. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for generating deep learning models, which improves the generation efficiency of deep learning models and enables them to be efficiently deployed online.
[0005] On one hand, embodiments of this application provide a method for generating a deep learning model, including:
[0006] Obtain model requirement information, which includes at least the required computing power and model tasks;
[0007] Based on multiple model components in the model component library, N deep learning model architectures are constructed to match the computing power requirements of the model. Each deep learning model architecture includes at least one of the model components, and N is an integer greater than 0.
[0008] Based on the model task and N deep learning model architectures, N initial deep learning models are obtained;
[0009] Based on N initial deep learning models, the target deep learning model is obtained.
[0010] Optionally, the construction of N deep learning model architectures that match the computational power requirements of the model, based on multiple model components in the model component library, includes:
[0011] Multiple model building operations are performed to obtain multiple initial model architectures. The model building operations include: performing at least one component filtering operation based on the model component library, and obtaining one initial model architecture based on the model components selected by the at least one component filtering operation.
[0012] From the multiple initial model architectures, N initial model architectures that match the computing power requirements of the model are selected as N deep learning model architectures.
[0013] Optionally, before performing multiple model building operations to obtain multiple initial model architectures, the method further includes:
[0014] The component selection requirements are determined based on the computing power required by the model, and the component selection requirements include the range of the number of model components to be selected;
[0015] The step of performing at least one component filtering operation based on the model component library includes:
[0016] Based on the component selection requirements, at least one component selection operation is performed on the model component library.
[0017] Optionally, from the plurality of said initial model architectures, N initial model architectures that match the computing power requirements of the model are selected, including:
[0018] Determine the computing power of each of the multiple initial model architectures;
[0019] From the multiple initial model architectures, N initial model architectures whose model computing power meets the set computing power requirements are selected, and the set computing power requirements are determined by the model's required computing power.
[0020] Optionally, determining the computing power of each of the multiple initial model architectures includes:
[0021] For each of the initial model architectures, perform the following operations:
[0022] Determine the input and output dimensions of each model component contained in each of the initial model architectures;
[0023] The computing power of each model component is determined based on its input and output dimensions.
[0024] The computing power of each initial model architecture is determined based on the computing power of each model component contained in each initial model architecture.
[0025] Optionally, obtaining an initial model architecture based on the model components selected through the at least one component filtering operation includes:
[0026] Following the order of the at least one component filtering operation, the model components selected by the at least one component filtering operation are sequentially connected to obtain an initial model architecture.
[0027] Optionally, obtaining N initial deep learning models based on the model task and the N deep learning model architectures includes:
[0028] Obtain the input and output networks corresponding to the model task;
[0029] For each of the deep learning model architectures, each deep learning model architecture is combined with the input network and the output network to obtain an initial deep learning model.
[0030] Optionally, the model requirements information may also include a sample dataset;
[0031] The process of obtaining the target deep learning model based on N initial deep learning models includes:
[0032] Based on the sample dataset, N initial deep learning models are trained respectively to obtain N candidate deep learning models after training.
[0033] Based on the sample dataset, the N candidate deep learning models are tested respectively to obtain the test results of each of the N candidate deep learning models.
[0034] Based on the test results of each of the N candidate deep learning models, a target deep learning model is selected from the N candidate deep learning models.
[0035] Optionally, the test results include model evaluation metrics corresponding to the model task;
[0036] The step of selecting a target deep learning model from the N candidate deep learning models based on their respective test results includes:
[0037] From the N candidate deep learning models, select one candidate deep learning model whose model evaluation index meets the set index conditions, and use it as the target deep learning model.
[0038] Optionally, each model component contains N convolutional layers, and each convolutional layer contains multiple input channels and multiple output channels;
[0039] After obtaining the target deep learning model based on N initial deep learning models, the process further includes:
[0040] For each model component included in the target deep learning model, if it is determined that at least one convolutional layer of the model component satisfies the model pruning condition, then the number of input channels and the number of output channels of each of the at least one convolutional layer are adjusted respectively.
[0041] Optionally, the method is applied to a terminal.
[0042] The acquisition of model requirement information includes:
[0043] In response to a user's demand indication operation triggered through the first interface, the model demand computing power and model task indicated by the demand indication operation are determined as the model demand information.
[0044] After obtaining the target deep learning model based on N initial deep learning models, the process further includes:
[0045] The target deep learning model is displayed through a second interface.
[0046] Optionally, the method is applied to the server side, and obtaining model requirement information includes:
[0047] The terminal receives model requirement information; the model requirement information is determined by the terminal in response to a user's requirement instruction operation triggered through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0048] After training the target deep learning model based on N initial deep learning models, the process further includes:
[0049] The target deep learning model is sent to the terminal so that the terminal can display the target deep learning model through a second interface.
[0050] On one hand, embodiments of this application provide a method for generating a deep learning model, including:
[0051] In response to a user's demand indication operation triggered through the first interface, the model demand computing power and model task indicated by the demand indication operation are determined as the model demand information.
[0052] Based on multiple model components in the model component library, N deep learning model architectures are constructed to match the computing power requirements of the model. Each deep learning model architecture includes at least one of the model components, and N is an integer greater than 0.
[0053] Based on the model task and the N deep learning model architectures, N initial deep learning models are obtained;
[0054] Based on the N initial deep learning models, the target deep learning model is obtained;
[0055] The target deep learning model is displayed through a second interface.
[0056] On one hand, embodiments of this application provide a method for generating a deep learning model, including:
[0057] The terminal receives model requirement information; the model requirement information is determined by the terminal in response to a user's requirement instruction operation triggered through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0058] Based on multiple model components in the model component library, N deep learning model architectures are constructed to match the computing power requirements of the model. Each deep learning model architecture includes at least one of the model components, and N is an integer greater than 0.
[0059] Based on the model task and the N deep learning model architectures, N initial deep learning models are obtained;
[0060] Based on the N initial deep learning models, the target deep learning model is obtained;
[0061] The target deep learning model is sent to the terminal so that the terminal can display the target deep learning model through a second interface.
[0062] On one hand, embodiments of this application provide an apparatus for generating deep learning models, comprising:
[0063] The requirement acquisition module is used to acquire model requirement information, which includes at least the required computing power and model tasks.
[0064] A building module is used to construct N deep learning model architectures that match the computing power requirements of the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one of the model components, and N is an integer greater than 0.
[0065] The model acquisition module is used to obtain N initial deep learning models based on the model task and the N deep learning model architectures;
[0066] The selection module is used to obtain the target deep learning model based on the N initial deep learning models.
[0067] Optionally, the building module is further configured to:
[0068] Multiple model building operations are performed to obtain multiple initial model architectures. The model building operations include: performing at least one component filtering operation based on the model component library, and obtaining one initial model architecture based on the model components selected by the at least one component filtering operation.
[0069] From the multiple initial model architectures, N initial model architectures that match the computing power requirements of the model are selected as N deep learning model architectures.
[0070] Optionally, the apparatus further includes a screening requirement determination module, used for:
[0071] The component selection requirements are determined based on the computing power required by the model, and the component selection requirements include the range of the number of model components to be selected;
[0072] The building module is also used for:
[0073] Based on the component selection requirements, at least one component selection operation is performed on the model component library.
[0074] Optionally, when selecting N initial model architectures from a plurality of initial model architectures that match the computing power required by the model, the construction module is further configured to:
[0075] Determine the computing power of each of the multiple initial model architectures;
[0076] From the multiple initial model architectures, N initial model architectures whose model computing power meets the set computing power requirements are selected, and the set computing power requirements are determined by the model's required computing power.
[0077] Optionally, when determining the computing power of each of the multiple initial model architectures, the construction module is further configured to:
[0078] For each of the initial model architectures, perform the following operations:
[0079] Determine the input and output dimensions of each model component contained in each of the initial model architectures;
[0080] The computing power of each model component is determined based on its input and output dimensions.
[0081] The computing power of each initial model architecture is determined based on the computing power of each model component contained in each initial model architecture.
[0082] Optionally, when obtaining an initial model architecture based on the model components selected based on the at least one component filtering operation, the construction module is further configured to:
[0083] Following the order of the at least one component filtering operation, the model components selected by the at least one component filtering operation are sequentially connected to obtain an initial model architecture.
[0084] Optionally, the model acquisition module is further configured to:
[0085] Obtain the input and output networks corresponding to the model task;
[0086] For each of the deep learning model architectures, each deep learning model architecture is combined with the input network and the output network to obtain an initial deep learning model.
[0087] Optionally, the model requirements information may also include a sample dataset;
[0088] The selection module is also used for:
[0089] Based on the sample dataset, N initial deep learning models are trained respectively to obtain N candidate deep learning models after training.
[0090] Based on the sample dataset, the N candidate deep learning models are tested respectively to obtain the test results of each of the N candidate deep learning models;
[0091] Based on the test results of each of the N candidate deep learning models, a target deep learning model is selected from the N candidate deep learning models.
[0092] Optionally, the test results include model evaluation metrics corresponding to the model task;
[0093] When selecting a target deep learning model from the N candidate deep learning models based on their respective test results, the selection module is further configured to:
[0094] From the plurality of candidate deep learning models, select one candidate deep learning model whose model evaluation index meets the set index conditions;
[0095] One of the candidate deep learning models is selected as the target deep learning model.
[0096] Optionally, each model component contains at least one convolutional layer, and each convolutional layer contains multiple input channels and multiple output channels;
[0097] The device further includes an adjustment module for:
[0098] For each model component included in the target deep learning model, if it is determined that at least one convolutional layer of the model component satisfies the model pruning condition, then the number of input channels and the number of output channels of each of the at least one convolutional layer are adjusted respectively.
[0099] Optionally, the device is used as a terminal, and the demand acquisition module is further used for:
[0100] In response to a user's demand indication operation triggered through the first interface, the model demand computing power and model task indicated by the demand indication operation are determined as the model demand information.
[0101] The device also includes a display module for:
[0102] The target deep learning model is displayed through a second interface.
[0103] Optionally, the device is applied to the server side, and the demand acquisition module is further used for:
[0104] The terminal receives model requirement information; the model requirement information is determined by the terminal in response to a user's requirement instruction operation triggered through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0105] The device further includes a model sending module for:
[0106] The target deep learning model is sent to the terminal so that the terminal can display the target deep learning model through a second interface.
[0107] On one hand, embodiments of this application provide an apparatus for generating deep learning models, comprising:
[0108] The requirement acquisition module is used to respond to the requirement instruction operation triggered by the user through the first interface, and determine the model requirement computing power and model task indicated by the requirement instruction operation as the model requirement information.
[0109] A building module is used to construct N deep learning model architectures that match the computing power requirements of the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one of the model components, and N is an integer greater than 0.
[0110] The model acquisition module is used to obtain N initial deep learning models based on the model task and N deep learning model architectures;
[0111] The selection module is used to obtain the target deep learning model based on the N initial deep learning models.
[0112] The display module is used to display the target deep learning model through a second interface.
[0113] On one hand, embodiments of this application provide an apparatus for generating deep learning models, comprising:
[0114] The requirement acquisition module is used to receive model requirement information sent by the terminal; the model requirement information is determined by the terminal in response to the requirement instruction operation triggered by the user through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0115] A building module is used to construct N deep learning model architectures that match the computing power requirements of the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one of the model components, and N is an integer greater than 0.
[0116] The model acquisition module is used to obtain N initial deep learning models based on the model task and N deep learning model architectures;
[0117] The selection module is used to obtain a target deep learning model based on N initial deep learning models, and send the target deep learning model to the terminal so that the terminal can display the target deep learning model through a second interface.
[0118] On one hand, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any of the methods described above for generating a deep learning model.
[0119] On one hand, embodiments of this application provide a computer storage medium including a computer program, which, when run on an electronic device, causes the electronic device to perform the steps of any of the methods described above for generating a deep learning model.
[0120] Since the embodiments of this application adopt the above-described technical solution, they have at least the following technical effects:
[0121] In the scheme of this application embodiment, based on the user's model requirement computing power and model task, and based on multiple model components in the model component library, N deep learning model architectures matching the model requirement computing power are constructed. Then, based on the model task and the N deep learning model architectures, N initial deep learning models are obtained. Based on the N initial deep learning models, the final target deep learning model is obtained. In this way, experienced algorithm engineers are not required to repeatedly adjust the model structure when building deep learning models, saving model building time, improving the generation efficiency of deep learning models, and facilitating the efficient deployment of deep learning models online.
[0122] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0123] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0124] Figure 1 Signaling interaction diagram of a method for generating a deep learning model provided in an embodiment of this application;
[0125] Figure 2 A schematic diagram of a first interface provided in an embodiment of this application;
[0126] Figure 3 A flowchart illustrating a method for generating a deep learning model, as provided in this application embodiment;
[0127] Figure 4 A schematic diagram of a second interface provided in an embodiment of this application;
[0128] Figure 5A A flowchart illustrating an implementation of generating a deep learning model, provided as an embodiment of this application;
[0129] Figure 5B A flowchart illustrating another implementation of generating a deep learning model provided in this application embodiment;
[0130] Figure 6 A flowchart of a method for generating a deep learning model on the terminal side is provided in an embodiment of this application;
[0131] Figure 7 A flowchart illustrating a server-side method for generating deep learning models, as provided in this application embodiment;
[0132] Figure 8 A structural block diagram of an apparatus for generating deep learning models provided in an embodiment of this application;
[0133] Figure 9 A structural block diagram of another apparatus for generating deep learning models provided in an embodiment of this application;
[0134] Figure 10 A structural block diagram of another apparatus for generating deep learning models provided in an embodiment of this application;
[0135] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0136] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0137] The word “exemplary” as used below means “serving as an example, embodiment, or illustration.” Any embodiment illustrated as an “exemplary” need not be construed as superior to or better than other embodiments.
[0138] The terms "first" and "second" used in this document are for descriptive purposes only and should not be construed as indicating relative importance or implying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0139] In related technologies, the main development work for tasks such as object detection, image classification, and action recognition involves generating deep learning models. To generate a high-performing deep learning model, experienced algorithm engineers are required to construct the model structure and then repeatedly adjust it, a process that is time-consuming. Therefore, the generation efficiency of deep learning models is relatively low, hindering their online use.
[0140] To efficiently generate deep learning models, improve the development efficiency of various tasks, and reduce reliance on algorithm engineers, deep learning models can be automatically constructed to generate the required deep learning models. Therefore, this application provides a method, apparatus, electronic device, and storage medium for generating deep learning models. Based on the user's model requirements and computing power, and the model task, N deep learning model architectures matching the required computing power are constructed using multiple model components from a model component library. Then, based on the model task and the N deep learning model architectures, N initial deep learning models are obtained. Finally, based on the N initial deep learning models, the final target deep learning model is obtained, improving the efficiency of deep learning model generation and facilitating the efficient online deployment of deep learning models.
[0141] The method for generating deep learning models in this application can be applied to any task development scenario. For example, the task development scenario is a visual task development scenario in the fields of intelligent assisted driving, intelligent robots, and intelligent security. The visual task includes, but is not limited to, object detection, image classification, behavior recognition, etc.
[0142] The specific implementation of the method for generating deep learning models according to the embodiments of this application is described below with reference to the accompanying drawings.
[0143] The method in this application embodiment can be executed by the terminal or the server alone, or by the terminal and the server in cooperation. The terminal includes, but is not limited to, mobile phones, tablets, laptops, desktop computers, e-book readers, smart voice interaction devices, smart home appliances, vehicle terminals, and other devices.
[0144] The following explanation uses the example of the terminal and server working together. Figure 1 The diagram illustrates the signaling interaction of a method for generating a deep learning model according to an embodiment of this application.
[0145] like Figure 1 As shown, the method for generating a deep learning model according to an embodiment of this application may include the following steps S101-S107:
[0146] Step S101: The terminal displays a first interface, which includes input items for model requirement information. The model requirement information includes at least the required computing power and model tasks.
[0147] Before building a deep learning model, users need to input model requirements information so that the constructed deep learning model meets their needs. Specifically, users can execute a trigger operation on the terminal to display the first interface. The model requirements information includes: model computing power requirements, which refers to the computing power required by the machine to run the deep learning model, specifically the maximum computing power; and model tasks, which refer to the tasks performed by the deep learning model, including but not limited to the aforementioned visual tasks: image classification, object detection, and action recognition.
[0148] For example, such as Figure 2 As shown, the first interface for model requirements information displays input items for the required computing power and the model task. Users can input the required computing power for the deep learning model to be generated, specifically the maximum computing power that the task deployment can provide, such as 10T; they can also input the specific model task, such as object detection, image classification, or behavior recognition. In addition, users can input sample datasets for subsequent training of the constructed deep learning model.
[0149] In step S102, the terminal responds to the demand indication operation triggered by the user through the first interface and determines the model demand computing power and model task indicated by the demand indication operation as model demand information.
[0150] For example, after a user inputs the required computing power and model tasks in the first interface mentioned above, they can submit the input, which triggers the requirement instruction operation. The terminal will then use the obtained required computing power and model tasks as the model requirement information.
[0151] In step S103, the terminal sends a model generation instruction containing model requirement information to the server.
[0152] In step S104, the server obtains the model requirement information and constructs N deep learning model architectures that match the computing power required by the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one model component, and N is an integer greater than 0.
[0153] The model component library can be pre-built and includes various existing model components, each of which can be considered the smallest unit structure of a model. For example, a Residual Network (ResNet) consists of multiple residual modules (Res blocks). A Res block can be used as a model component, and based on Res blocks, residual networks with different computational power can be formed, such as ResNet 18 (18 Res blocks), ResNet 36 (36 Res blocks), ResNet 50 (50 Res blocks), and ResNet 101 (101 Res blocks). Similarly, a Dense Convolutional Network (DenseNet) consists of multiple dense modules (Dense blocks), and a Dense block can be used as a model component.
[0154] The aforementioned model components can also be any other smallest unit structure that constitutes a deep learning model, and there are no restrictions here. The various model components in the model component library can be combined arbitrarily, and the same model component can also be stacked and combined with itself.
[0155] Optionally, in step S104 above, when constructing N deep learning model architectures that match the computational power requirements of the model based on multiple model components in the model component library, the following steps A1-A2 may be included:
[0156] Step A1: Perform multiple model building operations to obtain multiple initial model architectures. The model building operations include: performing at least one component filtering operation based on the model component library, and obtaining an initial model architecture based on the model components selected by the at least one component filtering operation.
[0157] The number of times the model building operation is executed can be set as needed and is not limited here. To obtain a wider variety of initial model architectures, the number of executions can be set to a larger value.
[0158] Since the model components in the model component library can be combined arbitrarily, at least one model component can be obtained from the model component library each time a model building operation is performed. That is, at least one combination filtering operation is performed, and an initial model architecture is obtained based on the filtered at least one model component.
[0159] To make the computing power of the constructed initial model architecture closer to the computing power required by the model, optionally, the following steps can be performed before executing step A above:
[0160] The component selection requirements are determined based on the computing power required by the model. The component selection requirements include the range of the number of model components to be selected.
[0161] Specifically, the correspondence between the computing power required by the model and the range of the number of model components can be preset. Based on this correspondence, the range of the number of model components corresponding to the computing power required by the model can be determined. For example, if the computing power required by the model is 10T, the range of the number of model components is 5 to 7.
[0162] Furthermore, when performing step A above, at least one component filtering operation can be performed on the model component library based on the component filtering requirements.
[0163] Assuming the component selection requirement is that the number of model components ranges from 5 to 7, then the component selection operation will be performed 5 to 7 times. It should be noted that the same model component can be selected once or multiple times; this is not limited here.
[0164] Optionally, in step A above, an initial model architecture is obtained based on the model components selected through at least one component filtering operation, including:
[0165] Following the order of at least one component filtering operation, the model components selected by at least one component filtering operation are sequentially linked together to obtain an initial model architecture.
[0166] For example, if five component filtering operations sequentially filter out model component 1, model component 2, model component 3, model component 4, and model component 5, then these five model components are sequentially linked and combined in the above order to obtain an initial model architecture, namely model component 1 + model component + model component 3 + model component 4 + model component 5.
[0167] Step A2: Select N initial model architectures from multiple initial model architectures that match the computing power required by the model, and use them as N deep learning model architectures.
[0168] After obtaining multiple initial model architectures, the computing power of each initial model architecture can be determined. Then, N initial model architectures whose computing power is closest to the computing power required by the model can be selected from the multiple initial model architectures. The value of N can be set as needed and is not limited here.
[0169] It should be noted that, in addition to the implementation methods of steps A1-A2 above, each time a model building operation is performed, an initial model architecture is obtained. It is then determined whether the computing power of the initial model architecture matches the computing power required by the model. If it does, the initial model architecture is output; otherwise, the initial model architecture is discarded, and the next model building operation is performed until N initial model architectures that match the computing power required by the model are output.
[0170] Optionally, step A2 above may include the following steps A21-A22:
[0171] Step A21: Determine the computing power of each of the multiple initial model architectures.
[0172] The computational power of each initial model architecture is determined by the computational power of each model component contained in that initial model architecture, and the computational power of each model component is determined according to its input dimension and output dimension.
[0173] Optionally, the computational power of each initial model architecture can be obtained through the following operation:
[0174] a. Determine the input and output dimensions of each model component included in each initial model architecture.
[0175] In each initial model architecture, the input dimension of each model component is the same as the output dimension of the preceding model component. The output dimension of each model component can be set as needed. Specifically, the input dimension of the first model component in the initial model architecture is determined by the output dimension of the input network, which is the feature dimension of the input image. The output dimension of the first model component can be set within a dimension range, for example, 128-192. The input dimension of the second model component is the same as the output dimension of the first model component, and its output dimension can also be set within a dimension range, and so on, thus determining the input and output dimensions of each model component.
[0176] It should be noted that the output dimensions of each model component can have the same or different dimensional ranges, which can be set according to needs.
[0177] b. Determine the computing power of each model component based on its input and output dimensions.
[0178] For a given model component, with known input and output dimensions, the computational power required to transform the input dimension into the output dimension can also be determined. For example, assuming the model component is a Res block, when the input dimension is 3 and the output dimension is 192, the computational power required to transform 3-dimensional image features into 192-dimensional image features is 1T.
[0179] c. Determine the model computing power of each initial model architecture based on the computing power of each model component contained in each initial model architecture.
[0180] Specifically, the computing power of each model component in each initial model architecture can be summed to obtain the computing power of that initial model architecture. For example, if the initial model architecture includes model component 1, model component 2, model component 3, model component 4, and model component 5, and their computing powers are 0.5T, 1T, 0.5T, 1T, and 0.5T respectively, then the computing power of the initial model architecture is 3.5T.
[0181] Step A22: Select N initial model architectures from multiple initial model architectures whose model computing power meets the set computing power requirements. The set computing power requirements are determined by the model's required computing power.
[0182] The computing power requirement can be set within the range of computing power needed for the model. For example, if the user inputs a computing power requirement of 10T, the requirement can be set to 10T-0.5 to 10T+0.5, depending on the specific needs. Specifically, multiple initial model architectures can be sorted according to their computing power, and the N initial model architectures that best match the required computing power can be selected from those that meet the set requirement.
[0183] In step S105, the server obtains N initial deep learning models based on the model task and N deep learning model architectures.
[0184] Different model tasks can use the same deep learning model architecture, but the inputs and outputs of different model tasks are different. For example, for object detection tasks and image classification tasks, object detection tasks require the entire image as input and output object detection boxes, while image classification tasks can take the region where the object is located in an image as input and output the category of the object.
[0185] Therefore, for the same deep learning model architecture, different model tasks can be achieved by setting different input and output networks. In other words, the input and output networks corresponding to each model task can be preset.
[0186] Optionally, step S105 above may include the following steps B1-B2:
[0187] Step B1: Obtain the input and output networks corresponding to the model task.
[0188] Specifically, different model tasks have pre-defined input and output networks. After obtaining the model task input by the user, the input and output networks corresponding to that task can be obtained. For example, the input network for an object detection task processes the entire image, and the output network includes a detection subnetwork and a classification subnetwork. The input network for an image classification task processes the region where an object is located in an image, and the output network is a classification network.
[0189] Step B2: For each deep learning model architecture, combine each deep learning model architecture with the input network and the output network to obtain an initial deep learning model.
[0190] Here, the input network, deep learning model architecture, and output network are combined sequentially to obtain the initial deep learning model. For example, if the model task is object detection, the resulting initial deep learning model is an object detection model; if the model task is image classification, the resulting initial deep learning model is an image classification model.
[0191] Step S106: The server obtains the target deep learning model based on N initial deep learning models.
[0192] In this step, N initial deep learning models are trained based on a sample dataset, which can be the dataset entered by the user in the first interface containing the model requirement information. After training the N initial deep learning models, the best deep learning model can be selected as the target deep learning model by testing the N trained models.
[0193] Optional, such as Figure 3 As shown, step S106 above may include the following steps S1061-S1063:
[0194] Step S1061: Train N initial deep learning models based on the sample dataset to obtain N candidate deep learning models after training.
[0195] Specifically, assuming the initial deep learning model is an object detection model, for each object detection model, the initial deep learning model is trained iteratively multiple times using a sample dataset until a preset convergence condition is met. This preset convergence condition can be either reaching a preset number of iterations or reaching a preset loss value. During one round of iterative training, the following operations can be performed: inputting sample data obtained from the sample dataset into the initial deep learning model to obtain the prediction results corresponding to the sample data; obtaining the corresponding loss value based on the prediction results and the actual results corresponding to the sample data; and adjusting the parameters of the initial deep learning model based on the loss value.
[0196] Step S1062: Test the N candidate deep learning models based on the sample dataset and obtain the test results of each of the N candidate deep learning models.
[0197] This involves selecting a subset of sample data from the sample dataset to test multiple candidate deep learning models. The test results can include model evaluation metrics for different tasks; these metrics may be the same or different for different tasks.
[0198] For example, in object detection tasks, deep learning models specifically target objects and need to determine the location information of objects in an image and classify them. Model evaluation metrics can include loss value, mean average precision (MAP), and other metrics, which will not be listed here. MAP can be calculated as follows: MAP = Sum of average precisions for all categories / Total number of categories. Specifically, assuming there are 20 categories, we first determine the average precision for each category. This is done by determining the detection precision of each image for a given category, assuming the test sample data contains 100 images. This gives us the average precision for that category, and then we obtain the sum of the average precisions for all 20 categories.
[0199] Step S1063: Based on the test results of each of the N candidate deep learning models, select the target deep learning model from the N candidate deep learning models.
[0200] As mentioned above, the test results include the model evaluation metrics corresponding to the model task. Optionally, step S1053 may include: selecting N candidate deep learning models from N candidate deep learning models whose model evaluation metrics meet the set metric conditions as the target deep learning model.
[0201] The criteria for setting indicators can be configured as needed. For example, when the model evaluation criteria include one indicator, the candidate deep learning model with the best performance in that indicator can be selected. When the model evaluation criteria include multiple indicators, multiple indicators can be considered, and the candidate deep learning model with the best performance can be selected based on the importance of the multiple indicators.
[0202] It should be noted that the aforementioned server can be a server cluster. Each server in the server cluster can train and test multiple candidate deep learning models separately. In this way, model training and testing can be performed in parallel, which greatly improves the efficiency of model training and testing.
[0203] In step S107, the server sends the target deep learning model to the terminal.
[0204] In step S108, the terminal displays the target deep learning model through the second interface.
[0205] Specifically, the structure of the target deep learning model can be displayed on the second interface, including the structure of the input network, the deep learning model architecture, and the structure of the output network. In addition, the computational power required by the target deep learning model can also be displayed.
[0206] It should be noted that the second interface may be the same as or different from the first interface. The target deep learning model displayed on the second interface will be described below as an example.
[0207] For example, such as Figure 4 As shown, the second interface displays a target deep learning model (e.g., an image classification model), whose input network is used to input 32... 32 The image is 1; the deep learning model architecture includes a first model component: containing 5×5 6-channel convolutions and 2×2 pooling; a second model component: containing 5×5 16-channel convolutions and 2×2 pooling; a third model component: containing 5×5 120-channel convolutions; the output network includes a first fully connected layer, a second fully connected layer, and a Softmax function. The first fully connected layer has 64 output neurons, the second fully connected layer has the number of output neurons equal to the number of categories in the classification label, and the Softmax function is used to calculate the predicted probability of each category.
[0208] The embodiments of this application can automatically construct N initial deep learning models, and obtain the final target deep learning model based on these initial deep learning models. In this way, experienced algorithm engineers are not required to repeatedly adjust the model structure when constructing deep learning models, which saves model construction time, improves the generation efficiency of deep learning models, and facilitates the efficient deployment of deep learning models for online use.
[0209] It should be noted that in some other embodiments, steps S104-S106 can also be executed by the terminal. In this case, in step S103, the terminal does not need to send the model generation instruction containing model requirement information to the server. Instead, it directly responds to the requirement instruction operation triggered by the user through the first interface and executes steps S104-S106 and step 108.
[0210] Based on the above embodiments of this application, after obtaining the target deep learning model, in order to further reduce the computing power required by the model, the target deep learning model can also be fine-tuned.
[0211] Specifically, each model component contains N convolutional layers, and each convolutional layer contains multiple input channels and multiple output channels. For example, for an image classification task, each input image feature can include multiple dimensions, with each dimension corresponding to one input channel. After performing a convolution operation on the image features, more dimensional features can be output, with each dimension corresponding to one output channel.
[0212] Before the server sends the target deep learning model to the terminal in step S107 above, the following steps can also be performed:
[0213] For each model component in the target deep learning model, if it is determined that the N convolutional layers of the model component meet the model pruning conditions, then the number of input channels and the number of output channels of each of the N convolutional layers are adjusted respectively.
[0214] Specifically, model pruning methods can be used to fine-tune the target deep learning model. For example, for each model component in the target deep learning model, model pruning methods can be used to evaluate the multiple input channels and multiple output channels of each convolutional layer contained therein, obtain the evaluation value of each input channel and the evaluation value of each output channel, and determine whether the corresponding input channel or output channel meets the model pruning conditions based on the evaluation values.
[0215] For example, if the evaluation value of an input channel is less than a preset value, it is determined that the input channel meets the model pruning conditions and can be deleted, thereby reducing the computing power required by the target deep learning model. Typically, in a target deep learning model, if the dimension of the input to one model component changes, the dimension of the input to other model components will also change; therefore, it is necessary to adjust the dimension of the input to each model component.
[0216] In this embodiment of the application, by fine-tuning the selected optimal deep learning model, the final generated deep learning model not only has better performance, but also meets the task deployment requirements in terms of computing power.
[0217] The following is combined with Figure 5A and Figure 5BThe specific implementation process of generating deep learning models in the embodiments of this application will be described by way of example.
[0218] This application provides an implementation process for generating a deep learning model, which can be executed by a terminal or a server. Figure 5A As shown, it can specifically include the following five processes:
[0219] Step S501: Build the model component library.
[0220] Specifically, the smallest unit structure that constitutes a deep learning model is used as a model component, and a model component library with rich model components is built.
[0221] Step S502: Construct the initial deep learning model.
[0222] In this step, firstly, based on the computing power required by the user's input model, and using the various model components in the model component library, N different deep learning model architectures are constructed, such as... Figure 5B As shown, the following steps can be performed:
[0223] Step S5021: Construct the initial model architecture.
[0224] Specifically, multiple model building operations can be performed to obtain multiple initial model architectures. Each model building operation includes: arbitrarily obtaining at least one model component from the model component library, and combining at least one model component into an initial model architecture.
[0225] Step S5022: Determine whether the computing power of the initial model architecture meets the set computing power requirements. If yes, proceed to step S5023; otherwise, discard the initial model architecture.
[0226] The computing power requirement is determined by the computing power demanded by the model.
[0227] Step S5023: Output the initial model architecture as the deep learning model architecture.
[0228] Furthermore, based on the model task input by the user, the input network and output network are determined, and the input network, output network and each deep learning model architecture are combined to obtain N different initial deep learning models.
[0229] Step S503: Train the initial deep learning model.
[0230] The N initial deep learning models constructed in step S502 above are trained in parallel.
[0231] Step S504: Test the trained deep learning model and select the optimal deep learning model.
[0232] The optimal deep learning model is the target deep learning model in the above embodiments of this application.
[0233] Step S505: Fine-tune the selected optimal deep learning model and output it.
[0234] Specifically, a model pruning algorithm is used to fine-tune the structure of the optimal deep learning model, outputting a deep learning model that meets the model's computational requirements and achieves better results.
[0235] This application provides a method for generating deep learning models. It eliminates the need for algorithm engineers to build models. By simply inputting a sample dataset, confirming the model task, and determining the maximum computing power available for task deployment, the method can automatically complete model building and training, and output a deployable deep learning model.
[0236] The following describes the process of generating a deep learning model by executing the method independently on the terminal.
[0237] like Figure 6 As shown in the embodiment of this application, a method for generating a deep learning model can be executed independently by the user terminal using the following steps S601-S605:
[0238] Step S601: In response to the user's demand instruction operation triggered through the first interface, the model demand computing power and model task indicated by the demand instruction operation are determined as model demand information.
[0239] Step S602: Based on multiple model components in the model component library, construct N deep learning model architectures that match the computing power required by the model. Each deep learning model architecture includes at least one model component, and N is an integer greater than 0.
[0240] Step S603: Based on the model task and N deep learning model architectures, obtain N initial deep learning models.
[0241] Step S604: Based on N initial deep learning models, obtain the target deep learning model.
[0242] Step S605: Display the target deep learning model through the second interface.
[0243] The specific implementation methods of steps S601-S605 are described in steps S101-S108 above, and will not be repeated here.
[0244] The following describes the process of executing the method for generating deep learning models independently on the server side.
[0245] like Figure 7As shown in the embodiment of this application, a method for generating a deep learning model can be executed independently by the user terminal using the following steps S701-S704:
[0246] Step S701: Receive model requirement information sent by the terminal; the model requirement information is determined by the terminal in response to the user's requirement instruction operation triggered through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0247] Step S702: Based on multiple model components in the model component library, construct N deep learning model architectures that match the computing power required by the model. Each deep learning model architecture includes at least one model component, and N is an integer greater than 0.
[0248] Step S703: Based on the model task and N deep learning model architectures, obtain N initial deep learning models.
[0249] Step S704: Based on N initial deep learning models, obtain the target deep learning model;
[0250] Step S705: Send the target deep learning model to the terminal so that the terminal can display the target deep learning model through the second interface.
[0251] The specific implementation methods of steps S701-S705 are described in steps S101-S108 above, and will not be repeated here.
[0252] Based on the same inventive concept, this application also provides an apparatus for generating a deep learning model. Since the principle of this apparatus in solving the problem is similar to the method in the above embodiments, the implementation of this apparatus can refer to the embodiments of the method, and the repeated parts will not be described again.
[0253] like Figure 8 As shown in the figure, this application provides an apparatus for generating a deep learning model, which can be applied to a terminal or a server. The apparatus includes a requirement acquisition module 81, a construction module 82, a model acquisition module 83, and a selection module 84.
[0254] The requirement acquisition module 81 is used to acquire model requirement information, which includes at least the required computing power and model tasks.
[0255] Module 82 is used to build N deep learning model architectures that match the computing power requirements of the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one model component, and N is an integer greater than 0.
[0256] The model acquisition module 83 is used to obtain N initial deep learning models based on the user model task and N deep learning model architectures.
[0257] Select module 84 to obtain the target deep learning model based on N initial deep learning models.
[0258] The embodiments of this application can automatically construct N initial deep learning models, and obtain the final target deep learning model based on these initial deep learning models. In this way, experienced algorithm engineers are not required to repeatedly adjust the model structure when constructing deep learning models, which saves model construction time, improves the generation efficiency of deep learning models, and facilitates the efficient deployment of deep learning models for online use.
[0259] Optionally, building module 82 is also used for:
[0260] Perform multiple model building operations to obtain multiple initial model architectures. The model building operations include: performing at least one component filtering operation based on the model component library, and obtaining an initial model architecture based on the model components selected by the at least one component filtering operation.
[0261] From multiple initial model architectures, select N initial model architectures that match the computing power required by the model as N deep learning model architectures.
[0262] Optionally, the device also includes a screening requirement determination module for:
[0263] The component selection requirements are determined based on the computing power required by the model. The component selection requirements include the range of the number of model components to be selected.
[0264] Module 82 is also used for:
[0265] Based on the component selection requirements, perform at least one component selection operation for the model component library.
[0266] Optionally, when selecting N initial model architectures from multiple initial model architectures that match the computing power required by the model, the building module is also used for:
[0267] Determine the computing power of each of the multiple initial model architectures;
[0268] From multiple initial model architectures, select N initial model architectures whose model computing power meets the set computing power requirements. The set computing power requirements are determined by the model's required computing power.
[0269] Optionally, when determining the computing power of each of the multiple initial model architectures, the building module 82 is also used for:
[0270] For each initial model architecture, perform the following operations:
[0271] Determine the input and output dimensions of each model component included in each initial model architecture;
[0272] The computing power of each model component is determined based on its input and output dimensions.
[0273] The computing power of each initial model architecture is determined based on the computing power of each model component contained in each initial model architecture.
[0274] Optionally, when obtaining an initial model architecture based on the model components selected from at least one component filtering operation, the building module 82 is also used for:
[0275] Following the order of at least one component filtering operation, the model components selected by at least one component filtering operation are sequentially linked together to obtain an initial model architecture.
[0276] Optionally, the model acquisition module 83 is also used for:
[0277] Obtain the input and output networks corresponding to the model task;
[0278] For each deep learning model architecture, each deep learning model architecture is combined with the input network and the output network to obtain an initial deep learning model.
[0279] Optionally, the model requirements information may also include the sample dataset;
[0280] Select module 84 is also used for:
[0281] Based on the sample dataset, N initial deep learning models are trained to obtain N candidate deep learning models after training.
[0282] Based on the sample dataset, N candidate deep learning models are tested respectively to obtain the test results of each of the N candidate deep learning models.
[0283] Based on the test results of each of the N candidate deep learning models, the target deep learning model is selected from the N candidate deep learning models.
[0284] Optionally, the test results may include model evaluation metrics corresponding to the model task;
[0285] When selecting the target deep learning model from N candidate deep learning models based on their respective test results, selection module 84 is also used for:
[0286] From N candidate deep learning models, select one candidate deep learning model that meets the set evaluation criteria as the target deep learning model.
[0287] Optionally, each model component contains N convolutional layers, and each convolutional layer contains multiple input channels and multiple output channels;
[0288] The device also includes an adjustment module for:
[0289] For each model component in the target deep learning model, if it is determined that the N convolutional layers of the model component meet the model pruning conditions, then the number of input channels and the number of output channels of each of the N convolutional layers are adjusted respectively.
[0290] Optionally, the device is used for the terminal, and the demand acquisition module 81 is also used for:
[0291] In response to the user's demand instruction operation triggered through the first interface, the model demand computing power and model task indicated by the demand instruction operation are determined as model demand information;
[0292] The device also includes a display module for:
[0293] The target deep learning model is displayed through a second interface.
[0294] Optionally, the device is used on the server side, and the demand acquisition module 81 is also used for:
[0295] The terminal receives model requirement information sent by the terminal. The model requirement information is determined by the terminal in response to the user's requirement instruction operation triggered through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0296] The device also includes a model sending module for:
[0297] The target deep learning model is sent to the terminal so that the terminal can display the target deep learning model through a second interface.
[0298] Based on the same inventive concept, embodiments of this application provide an apparatus for generating deep learning models, such as... Figure 9 As shown, it includes:
[0299] The demand acquisition module 81 is used to respond to the demand instruction operation triggered by the user through the first interface, and to determine the model demand computing power and model task indicated by the demand instruction operation as model demand information.
[0300] Module 82 is used to build N deep learning model architectures that match the computing power requirements of the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one model component, and N is an integer greater than 0.
[0301] The model acquisition module 83 is used to obtain N initial deep learning models based on the model task and N deep learning model architectures.
[0302] Select module 84 to obtain the target deep learning model based on N initial deep learning models;
[0303] Display module 85 is used to display the target deep learning model through a second interface.
[0304] Based on the same inventive concept, embodiments of this application provide an apparatus for generating deep learning models, such as... Figure 10 As shown, it includes:
[0305] The requirement acquisition module 81 is used to receive model requirement information sent by the terminal. The model requirement information is determined by the terminal in response to the requirement instruction operation triggered by the user through the first interface, based on the model requirement computing power and model task indicated by the requirement instruction operation.
[0306] Module 82 is used to build N deep learning model architectures that match the computing power requirements of the model based on multiple model components in the model component library. Each deep learning model architecture includes at least one model component, and N is an integer greater than 0.
[0307] The model acquisition module 83 is used to obtain N initial deep learning models based on the model task and N deep learning model architectures.
[0308] Select module 84 to obtain the target deep learning model based on N initial deep learning models;
[0309] The sending module 86 sends the target deep learning model to the terminal so that the terminal can display the target deep learning model through the second interface.
[0310] Based on the same inventive concept, this application also provides an electronic device. Since this electronic device is the same as the electronic device in the method of this application, and the principle of solving the problem by this electronic device is similar to that of the method, the implementation of this electronic device can refer to the embodiments of the method, and repeated details will not be described again.
[0311] like Figure 11 As shown, the electronic device includes a processor 1100, a memory 1101, and a communication interface 1102. The processor 1100 communicates with the communication interface 1102 and the memory 1101 via a communication bus 1103. The memory 1101 stores programs executable by the processor 1100, and the processor 1100 reads the programs from the memory 1101 and executes any of the steps of the method for generating a deep learning model in the above embodiments.
[0312] The communication bus 1103 mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface 1102 is used for communication between the aforementioned electronic device and other devices. The memory can include Random Access Memory (RAM), or Non-Volatile Memory (NVM), such as N disk drives. Optionally, the memory can also be N storage devices located far from the aforementioned processor.
[0313] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0314] Based on the same inventive concept, embodiments of this application also provide a computer storage medium, which stores a computer program executable by a processor. When the program is run on the processor, it causes the processor to perform the steps of any of the methods for generating a deep learning model described in the above embodiments.
[0315] The aforementioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in an electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), optical storage such as CDs, DVDs, BDs, HVDs, and semiconductor storage such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), solid-state drives (SSDs), etc.
[0316] In another embodiment provided in this application, a computer program product containing instructions is also provided. When the computer program product is invoked and executed by an electronic device, the electronic device can perform the steps of any of the methods for generating deep learning models in the above embodiments.
[0317] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0318] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0319] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0320] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0321] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method of generating a deep learning model, the method comprising: The method comprises the following steps: acquiring model requirement information, the model requirement information at least comprising model requirement computing power and a model task; wherein the model requirement computing power refers to computing power required by a machine when running a deep learning model, and the model task refers to a task performed by the deep learning model; performing a plurality of model construction operations to obtain a plurality of initial model architectures, wherein the model construction operation comprises: performing at least one component screening operation based on a model component library, and obtaining one initial model architecture based on model components selected by the at least one component screening operation; selecting N initial model architectures matching the model requirement computing power from the plurality of initial model architectures as N deep learning model architectures; each deep learning model architecture comprises at least one model component, and N is an integer greater than 0; obtaining N initial deep learning models based on the model task and the N deep learning model architectures; obtaining a target deep learning model based on the N initial deep learning models.
2. The method of claim 1, wherein, Before the step of performing a plurality of model construction operations to obtain a plurality of initial model architectures, the method further comprises the following steps: determining a component screening requirement based on the model requirement computing power, wherein the component screening requirement comprises a quantity range of screened model components; the step of performing at least one component screening operation based on the model component library comprises the following steps: performing at least one component screening operation on the model component library based on the component screening requirement.
3. The method of claim 1, wherein, The step of selecting N initial model architectures matching the model requirement computing power from the plurality of initial model architectures comprises the following steps: determining model computing power of each of the plurality of initial model architectures respectively; selecting N initial model architectures whose model computing power meets a set computing power requirement from the plurality of initial model architectures, wherein the set computing power requirement is determined by the model requirement computing power.
4. The method of claim 3, wherein, The step of determining model computing power of each of the plurality of initial model architectures respectively comprises the following steps: for each initial model architecture, the following operations are performed: determining input dimensions and output dimensions of each model component contained in each initial model architecture; determining computing power of each model component based on the input dimensions and the output dimensions of each model component; determining model computing power of each initial model architecture based on computing power of each model component contained in each initial model architecture.
5. The method of claim 2, wherein, The step of obtaining one initial model architecture based on model components selected by the at least one component screening operation comprises the following steps: in accordance with an operation sequence of the at least one component screening operation, sequentially connecting each model component selected by the at least one component screening operation to obtain one initial model architecture.
6. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining N initial deep learning models based on the model task and the N deep learning model architectures comprises the following steps: acquiring an input network and an output network corresponding to the model task; for each deep learning model architecture, combining each deep learning model architecture with the input network and the output network to obtain one initial deep learning model.
7. The method according to any one of claims 1 to 5, characterized in that, The model requirement information further comprises a sample data set; The step of obtaining a target deep learning model based on the N initial deep learning models comprises the following steps: training, respectively, N initial deep learning models based on the sample data set, to obtain N trained candidate deep learning models; testing, respectively, N candidate deep learning models based on the sample data set, to obtain a test result of each of the N candidate deep learning models; selecting a target deep learning model from the N candidate deep learning models based on the test result of each of the N candidate deep learning models.
8. The method of claim 7, wherein, The test result includes a model evaluation index corresponding to the model task. The selecting a target deep learning model from the plurality of candidate deep learning models based on the test result of each of the plurality of candidate deep learning models includes: selecting, from the plurality of candidate deep learning models, a candidate deep learning model whose model evaluation index meets a set index condition as the target deep learning model.
9. The method according to any one of claims 1 to 5, characterized in that, Each model component includes N convolutional layers, and each convolutional layer includes a plurality of input channels and a plurality of output channels. After the obtaining the target deep learning model based on the N initial deep learning models, the method further includes: For each model component included in the target deep learning model, if it is determined that at least one convolutional layer of the model component meets a model pruning condition, respectively adjusting the number of input channels and the number of output channels of the at least one convolutional layer.
10. The method according to any one of claims 1 to 5, characterized in that, Applied to a terminal, The obtaining model requirement information includes: In response to a requirement indication operation triggered by a user through a first interface, determining the model requirement computing power and the model task indicated by the requirement indication operation as the model requirement information; After the obtaining the target deep learning model based on the N initial deep learning models, the method further includes: Displaying the target deep learning model through a second interface.
11. The method according to any one of claims 1 to 5, characterized in that, Applied to a server, The obtaining model requirement information includes: Receiving model requirement information sent by a terminal; the model requirement information is determined by the terminal based on a model requirement computing power and a model task indicated by a requirement indication operation triggered by a user through a first interface in response to the requirement indication operation; After the obtaining the target deep learning model based on the N initial deep learning models, the method further includes: Sending the target deep learning model to the terminal, so that the terminal displays the target deep learning model through a second interface.
12. A method of generating a deep learning model, the method comprising: The method includes: In response to a requirement indication operation triggered by a user through a first interface, determining the model requirement computing power and the model task indicated by the requirement indication operation as the model requirement information; wherein the model requirement computing power refers to the computing power required by a machine when running a deep learning model, and the model task refers to a task performed by a deep learning model. Performing multiple model construction operations to obtain multiple initial model architectures, wherein the model construction operation comprises: performing at least one component screening operation based on the model component library, and obtaining one of the initial model architectures based on the model components selected by the at least one component screening operation; selecting N initial model architectures matching the model demand computing power from the multiple initial model architectures as N deep learning model architectures; each of the deep learning model architectures comprises at least one of the model components, and N is an integer greater than 0; Based on the model task and N deep learning model architectures, obtain N initial deep learning models; Based on N initial deep learning models, obtain a target deep learning model; Display the target deep learning model through the second interface.
13. A method of generating a deep learning model, the method comprising: Comprise: Receiving model demand information sent by a terminal; the model demand information is determined by the terminal based on the model demand computing power and the model task indicated by the user in response to the user triggering a demand indication operation through a first interface; wherein the model demand computing power refers to the computing power required by a machine when running a deep learning model, and the model task refers to the task performed by a deep learning model Performing multiple model construction operations to obtain multiple initial model architectures, wherein the model construction operation comprises: performing at least one component screening operation based on the model component library, and obtaining one of the initial model architectures based on the model components selected by the at least one component screening operation; selecting N initial model architectures matching the model demand computing power from the multiple initial model architectures as N deep learning model architectures; each of the deep learning model architectures comprises at least one of the model components, and N is an integer greater than 0; Based on the model task and N deep learning model architectures, obtain N initial deep learning models; Based on N initial deep learning models, obtain a target deep learning model; Send the target deep learning model to the terminal to enable the terminal to display the target deep learning model through the second interface.
14. An apparatus for generating a deep learning model, the apparatus comprising: Comprise: The demand acquisition module is used for acquiring model demand information, and the model demand information is input by a user in a first interface and at least includes model demand computing power and a model task; wherein the model demand computing power refers to the computing power required by a machine when running a deep learning model, and the model task refers to the task performed by a deep learning model The construction module is used for performing multiple model construction operations to obtain multiple initial model architectures, wherein the model construction operation comprises: performing at least one component screening operation based on the model component library, and obtaining one of the initial model architectures based on the model components selected by the at least one component screening operation; selecting N initial model architectures matching the model demand computing power from the multiple initial model architectures as N deep learning model architectures; each of the deep learning model architectures comprises at least one of the model components, and N is an integer greater than 0; The model obtaining module is configured to obtain N initial deep learning models based on the model task and the N deep learning model architectures. The selection module is configured to obtain a target deep learning model based on the N initial deep learning models.
15. An apparatus for generating a deep learning model, the apparatus comprising: The method comprises the following steps: The requirement obtaining module is configured to determine, as the model requirement information, a model requirement computing power and a model task indicated by a requirement indication operation triggered by a user through a first interface. The construction module is configured to perform a plurality of model construction operations to obtain a plurality of initial model architectures. The model obtaining module is configured to obtain N initial deep learning models based on the model task and the N deep learning model architectures. The selection module is configured to obtain a target deep learning model based on the N initial deep learning models. The display module is configured to display the target deep learning model through a second interface.
16. An apparatus for generating a deep learning model, the apparatus comprising: The requirement obtaining module is configured to receive model requirement information sent by a terminal. The model requirement information is determined based on a model requirement computing power and a model task indicated by a requirement indication operation triggered by a user through a first interface. The construction module is configured to perform a plurality of model construction operations to obtain a plurality of initial model architectures. The model obtaining module is configured to obtain N initial deep learning models based on the model task and the N deep learning model architectures. The selection module is configured to obtain a target deep learning model based on the N initial deep learning models, and send the target deep learning model to the terminal, so that the terminal displays the target deep learning model through a second interface. 17. An electronic device, comprising: A computer program product, comprising a computer readable medium, the computer readable medium having stored thereon the computer program of claim 14.
18. A computer-readable storage medium, characterized in that, A computer program, which when run on an electronic device, is configured to cause the electronic device to perform the steps of any one of claims 1-13.
Citation Information
Patent Citations
Deep learning model building method and device, equipment and storage medium
CN110991649A
Modeling parameter configuration method, device and equipment and computer storage medium
CN112000330A