Model construction method and apparatus, and storage medium and electronic device

By using proxy models in neural architecture search to obtain the performance parameters of deep learning models in different hardware environments, filter out the architecture to be tested and deploy the test model, it solves the long-term problem in the existing technology and improves the depth of automation construction Learning the efficiency of the model.

WO2024234477A1PCT designated stage expired Publication Date: 2024-11-21ZHEJIANG LAB +1

Patent Information

Application Number
PCT/CN2023/108951
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-15
Filing Date
2023-07-24
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

The existing neural architecture search methods do not consider hardware attributes when evaluating performance, which results in the acquisition of performance indicators of deep learning models in different hardware environments for a long time, affecting the efficiency of automated construction of deep learning models.

Method used

By obtaining the model construction request, multiple candidate architectures are determined and inputting them into the preset proxy model to obtain performance parameters. The architecture to be tested is selected based on the performance parameters, and the test model is deployed to obtain the real performance parameters, thereby filtering out the target architecture. , build a target model.

Benefits of technology

The efficiency of automated construction of deep learning models is improved. Through the screening of some candidate architectures with lower accuracy in predicting performance parameters by proxy models, the performance parameters of the remaining candidate architecture are directly obtained, reducing the cost of obtaining performance parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023108951_21112024_PF_FP_ABST
    Figure CN2023108951_21112024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a model construction method and apparatus, and a storage medium and an electronic device. The model construction method comprises: acquiring a model construction request; determining a plurality of candidate architectures according to the request; for each candidate architecture, inputting the candidate architecture into a preset proxy model, and obtaining a first performance parameter of the candidate architecture in a hardware environment by means of the proxy model; determining a weight of each candidate architecture according to the respective first performance parameters of the plurality of candidate architectures, and according to the respective weights of the plurality of candidate architectures, performing screening on the plurality of candidate architectures to obtain an architecture under test; deploying a test model in the hardware environment according to the architecture under test, and acquiring a second performance parameter of the architecture under test; according to the second performance parameter of the architecture under test and the first performance parameters corresponding to the candidate architectures other than the architecture under test, performing screening on the plurality of candidate architectures to obtain a target architecture; and constructing a target model according to the target architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Model construction method, device, storage medium and electronic device Technical Field

[0001] This specification relates to the field of artificial intelligence technology, and in particular to a model building method, device, storage medium, and electronic device. Background Art

[0002] Neural Architecture Search (NAS) is an important part of Automatic Deep Learning (AutoDL). It is used to automatically design the network architecture of a deep learning model suitable for processing an input dataset (such as a training set and / or validation set) from the search space through certain search strategies and performance evaluation strategies, thereby realizing automated processing of the dataset.

[0003] Among them, the usual NAS method does not consider hardware properties in the performance evaluation strategy. In the hardware-aware neural architecture search method, it is usually also necessary to consider the performance index parameters of the network architecture of the designed deep learning model in different hardware environments to screen out the optimal network architecture from multiple designed deep learning models. When obtaining the performance index parameters of the network architecture of the designed deep learning model in different hardware environments, it is necessary to deploy the corresponding model on the hardware platform according to the network architecture of each designed deep learning model, so as to obtain the performance index parameters of the network architecture of each designed deep learning model in different hardware environments, which makes the overall process time-consuming.

[0004] Therefore, how to improve the efficiency of automatically building deep learning models is an urgent problem to be solved.

[0005] Summary of the Invention

[0006] This specification provides a model construction method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.

[0007] This manual adopts the following technical solutions:

[0008] This specification provides a model building method, including: obtaining a model building request; determining multiple candidate architectures based on the model building request; for each candidate architecture, inputting the candidate architecture into a preset proxy model, and obtaining the performance parameters of the candidate architecture in a specified hardware environment through the proxy model as first performance parameters; determining the weight of each candidate architecture based on the first performance parameters of each of the multiple candidate architectures, and screening out an architecture to be tested from the multiple candidate architectures based on the weights of each of the multiple candidate architectures; deploying a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested; screening out a target architecture from the multiple candidate architectures based on the second performance parameters corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures other than the architecture to be tested; and building a target model based on the target architecture.

[0009] Optionally, according to the model building request, the multiple candidate architectures are determined, specifically including: according to the model building request, screening out atomic operations used to constitute each candidate architecture from a preset multiple atomic operations, the atomic operations including: at least one of conventional convolution operation, separable convolution operation, average pooling operation, and maximum pooling operation.

[0010] Optionally, according to the model building request, atomic operations for constituting each candidate architecture are screened out from the preset multiple atomic operations, specifically including: according to the model building request, determining multiple optimization targets, the optimization targets are used to measure the multiple atomic operations and / or the candidate architectures; through a preset optimizer, obtaining the atomic operations for constituting each candidate architecture from the preset multiple atomic operations.

[0011] Optionally, the weight of each candidate architecture is determined based on the first performance parameters of each of the multiple candidate architectures, specifically including: determining a target screening strategy from preset screening strategies based on the task type of the proxy model, the task types including: classification tasks and regression tasks; determining the weight of each candidate architecture based on the target screening strategy and the first performance parameters.

[0012] Optionally, the weight of each candidate architecture is determined based on the target screening strategy and the first performance parameter, specifically including: when the task type is the classification task, for each candidate architecture corresponding to the first performance parameter, determining the confidence of the first performance parameter corresponding to the candidate architecture; based on the confidence, determining the weight of each candidate architecture, wherein the target screening strategy is that the lower the confidence of the first performance parameter corresponding to a candidate architecture, the higher the weight of the candidate architecture.

[0013] Optionally, the weight of each candidate architecture is determined based on the target screening strategy and the first performance parameter, specifically including: when the task type is the regression task, for each candidate architecture corresponding to the first performance parameter, determining the contribution of the first performance parameter corresponding to the candidate architecture; based on the contribution, determining the weight of each candidate architecture, wherein the target screening strategy is that the higher the contribution of the first performance parameter corresponding to a candidate architecture, the higher the weight of the candidate architecture.

[0014] Optionally, for each candidate architecture, the candidate architecture is input into the preset proxy model, and the performance parameters of the candidate architecture in the specified hardware environment are obtained through the proxy model as the first performance parameters, specifically including: for each candidate architecture, the candidate architecture is input into multiple proxy models, and the performance parameters of the candidate architecture in multiple specified hardware environments are obtained as multiple first performance parameters, wherein each proxy model is used to predict the performance parameters of the candidate architecture in at least one of the specified hardware environments; according to the first performance parameters of each of the multiple candidate architectures, the weight of each candidate architecture is determined, and according to the weights of each of the multiple candidate architectures, the architecture to be tested is screened out from the multiple candidate architectures, specifically including: according to the multiple first performance parameters of each of the multiple candidate architectures, the weight of each candidate architecture is determined; The method comprises the following steps: deploying a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested, specifically including: deploying a test model in the multiple specified hardware environments according to the architecture to be tested to obtain a plurality of second performance parameters corresponding to the architecture to be tested in the multiple hardware environments; and selecting a target architecture from the multiple candidate architectures according to the second performance parameters corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures except the architecture to be tested, specifically including: selecting the target architecture from the multiple candidate architectures according to the multiple second performance parameters corresponding to the architecture to be tested and the multiple first performance parameters corresponding to other candidate architectures except the architecture to be tested.

[0015] Optionally, the proxy model includes: a feature extraction layer and multiple decision layers, wherein different decision layers are used to determine different types of performance parameters of the candidate architecture in the specified hardware environment; inputting the candidate architecture into the preset proxy model, and obtaining the performance parameters of the candidate architecture in the specified hardware environment through the proxy model as the first performance parameters, specifically including: inputting the candidate architecture into the feature extraction layer of the proxy model to obtain the feature representation of the candidate architecture output by the feature extraction layer; inputting the feature representation of the candidate architecture into the multiple decision layers of the proxy model to obtain multiple sub-first performance parameters of the candidate architecture in the specified hardware environment; and obtaining the first performance parameters of the candidate architecture in the specified hardware environment based on the multiple sub-first performance parameters.

[0016] Optionally, the input of the proxy model further includes a plurality of label data, and the label data is used to train the corresponding sub-first performance parameters.

[0017] Optionally, the method further includes: training the proxy model with the goal of minimizing the deviation between a first performance parameter corresponding to the architecture to be tested and a second performance parameter corresponding to the architecture to be tested output by the proxy model.

[0018] Optionally, the method further includes: obtaining multiple supplementary architectures; for each supplementary architecture, inputting the supplementary architecture into the proxy model, and obtaining the performance parameters of the supplementary architecture in the specified hardware environment through the proxy model as first performance parameters; deploying a test model in the specified hardware environment according to the supplementary test architecture to obtain second performance parameters of the supplementary architecture; and further training the proxy model with the goal of minimizing the deviation between the first performance parameter corresponding to the supplementary architecture output by the proxy model and the second performance parameter corresponding to the supplementary architecture.

[0019] Optionally, based on the second performance parameter corresponding to the architecture to be tested and the first performance parameter corresponding to the other candidate architectures except the architecture to be tested, the target architecture is screened out from the multiple candidate architectures, specifically including: based on the second performance parameter corresponding to the architecture to be tested and the first performance parameter corresponding to the other candidate architectures except the architecture to be tested, determining the optimal candidate architecture or the Pareto-dominant candidate architecture from the multiple candidate architectures as the target architecture.

[0020] The present specification provides a model building device, comprising: an acquisition module for obtaining a model building request; a determination module for determining multiple candidate architectures based on the model building request; a first evaluation module for inputting each candidate architecture into a preset proxy model to obtain the performance parameters of the candidate architecture in a specified hardware environment as first performance parameters; a screening module for determining the weight of each candidate architecture based on the first performance parameters of each of the multiple candidate architectures, and screening out an architecture to be tested from the multiple candidate architectures based on the weights of each of the multiple candidate architectures; a second evaluation module for deploying a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested; a decision module for screening out a target architecture from the multiple candidate architectures based on the second performance parameters corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures other than the architecture to be tested; and an execution module for building a target model based on the target architecture.

[0021] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned model building method is implemented.

[0022] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned model building method when executing the program.

[0023] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0024] The model building method provided in this specification first obtains a model building request, determines each candidate architecture based on the model building request, inputs the candidate architecture into a preset proxy model for each candidate architecture, obtains the performance parameters of the candidate architecture in a specified hardware environment through the proxy model as the first performance parameters, determines the weight of each candidate architecture based on the first performance parameters, and screens out an architecture to be tested from each candidate architecture based on the weights, deploys a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested, screens out a target architecture from each candidate architecture based on the second performance parameters corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures except the architecture to be tested, and builds a target model according to the target architecture.

[0025] It can be seen from the above method that the candidate architectures that need to be tested can be screened to screen out some candidate architectures whose performance parameters predicted by the proxy model have low accuracy, so as to obtain the true performance parameters of the candidate architecture by deploying the test model. For the remaining candidate architectures, the performance parameters of these candidate architectures can be directly obtained through the proxy model, thereby improving the efficiency of automatically building deep learning models. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:

[0027] FIG1 is a flow chart of a model construction method provided in this specification;

[0028] FIG2 is a schematic diagram of the process of determining a candidate architecture provided in this specification;

[0029] FIG3 is a schematic diagram of the structure of the proxy model provided in this specification;

[0030] FIG4 is a schematic diagram of a process for determining a test architecture provided in this specification;

[0031] FIG5 is a schematic diagram of a model building device provided in this specification;

[0032] FIG6 is a schematic diagram of an electronic device provided in this specification. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.

[0034] The technical solutions provided by the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0035] FIG1 is a flow chart of a model construction method provided in this specification, which includes the following steps.

[0036] S101: Obtain a model building request.

[0037] With the development of deep learning technology, neural architecture search technology has gradually received widespread attention. After users provide the required data to the automatic deep learning platform, the automatic deep learning platform can automatically build a deep learning model based on the user-provided data based on the neural architecture search technology. Based on the constructed deep learning model and the user-provided data, the platform can perform corresponding tasks (for example, processing the user-provided data, fitting the data distribution of the user-provided data, etc.). However, the development of automatic deep learning technology is currently limited by the long time required to automatically build deep learning models.

[0038] Based on this, in this specification, when a user needs to perform a target task, they can generate a model building request based on the data required to perform the target task by providing a deep learning model, and send the generated model building request to the business platform. After receiving the model building request sent by the user, the business platform can automatically build the deep learning model based on the received model building request. For example, when a user needs to make a product recommendation, they can send the data required to build the recommendation model to the business platform, so that the business platform can automatically build the recommendation model based on the data provided by the user.

[0039] The required data may include a data training set and / or a data verification set corresponding to the task, and these data sets may include annotated data and unannotated data. The required data may further include user needs, such as product recommendations, classification problems, hardware resources available to the user, and so on. In some embodiments, the data input by the user may also include limitations on the platform, such as the user's input of the network type, the number of epochs, or even a specific search strategy based on their own experience. This application does not limit the data included in the construction request.

[0040] In this specification, the execution entity used to implement the model building method can refer to a designated device such as a server set up on the business platform, or it can refer to a designated device such as a desktop computer, laptop computer, mobile phone, etc. For the sake of convenience of description, the model building method provided in this specification is explained below using the server as the execution entity as an example.

[0041] S102: Determine multiple candidate architectures according to the model building request.

[0042] After receiving the model building request sent by the user, the server can determine the candidate architecture type from the predefined architecture types based on the received model building request, and based on the determined candidate architecture type, filter out the atomic operations that match the candidate architecture type from the preset atomic operations as the candidate atomic operations.

[0043] Among them, the above-mentioned candidate architecture types may include: Convolutional Neural Network (CNN) model architecture, Transformer model architecture, etc.

[0044] The above atomic operations include: conventional convolution operation, separable convolution operation, average pooling operation, maximum pooling operation and other operations.

[0045] Then, a preset optimizer can be used to determine the atomic operations used to constitute each candidate architecture from the candidate atomic operations as the target atomic operations corresponding to each candidate architecture, as shown in FIG2 .

[0046] FIG2 is a schematic diagram of the candidate architecture determination process provided in this specification. In conjunction with FIG2 , it can be seen that the server can determine a candidate architecture type from each predefined architecture type based on the received model building request, and based on the determined candidate architecture type, screen out each atomic operation that matches the candidate architecture type from each preset atomic operation as each candidate atomic operation, and then use each candidate atomic operation and the operation parameters contained in the candidate architecture type as the search space (which can be understood as the search range) for the neural architecture search.

[0047] The operational parameters included in the candidate architecture type can include, for example, the step size, convolution kernel size, and pooling kernel size in a convolutional neural network model architecture. Another example is the hidden size of the hidden layer in a Transformer model architecture, or the number of heads in a multi-head attention mechanism. This operational parameter is only an example and is not limited in this application.

[0048] In some examples, two candidate atomic operations may be of the same type but have different operation parameters. For example, a regular convolution operation with a convolution kernel size of 5x5 and a regular convolution operation with a convolution kernel size of 3x3 can be considered as two candidate atomic operations.

[0049] It should be noted that when the server builds a deep learning model, it not only needs to configure the atomic operations contained in the deep learning model, but also needs to configure the operation parameters of the deep learning model. Therefore, when determining the search space, the server can determine the search space for the neural architecture search based on the operation parameters contained in each candidate atomic operation and the candidate architecture type.

[0050] Furthermore, after determining the search space, the server can determine multiple optimization objectives based on the model building request, and run a preset multi-objective optimization algorithm through a preset optimizer to sample from the preset atomic operations to obtain the atomic operations used to constitute each candidate architecture, and evaluate the values ​​of multiple optimization objectives for each candidate architecture and / or multiple atomic operations (in other words, the multi-objective optimization algorithm can be used to sample the atomic operations used to constitute each candidate architecture from the neural architecture search space, and use it as a sampling point. After sampling, the values ​​of multiple optimization objectives of this sampling point can be measured, and during sampling, the values ​​of multiple optimization objectives of one or more atomic operations can be measured). The optimization objectives here refer to indicators used to evaluate the performance of each candidate architecture, such as accuracy, precision, recall, and performance parameters in a specified hardware environment (such as latency, throughput, memory access, cache overhead, etc.). The selection of optimization objectives needs to be determined based on the attributes of the target task and the model deployment scenario. For example, a multi-objective optimization algorithm run requires multiple samplings, and one sampling corresponds to a multi-objective optimization algorithm run.

[0051] In the above content, the multi-objective optimization algorithm can adopt, for example, a multi-objective simulated annealing algorithm, a multi-objective reinforcement learning algorithm, a multi-objective evolutionary algorithm, and the like.

[0052] In some examples, the process of the server sampling through a multi-objective optimization algorithm to determine the target architecture can be understood as a path optimization process. For example, the server can determine an atomic operation from each atomic operation as a starting point, and then select an atomic operation from each atomic operation and the above-mentioned atomic operation combination as a starting point as an initial candidate architecture, and then evaluate the initial candidate architecture. According to the evaluation result, it is determined whether the atomic operation combination is the optimal atomic operation combination. The evaluation result can be obtained through an evaluation strategy independent of the above-mentioned multi-objective optimization algorithm. In some examples, if it is optimal, an atomic operation can be selected again from each atomic operation and added to the above-mentioned atomic operation combination to obtain a new initial candidate architecture, and the new initial candidate architecture can be evaluated, and so on to obtain a candidate architecture.

[0053] It should be noted that, considering that the huge amount of computation and long running time of some neural architecture search technologies have a negative impact on their use, in the method provided in this application, the optimization search of candidate architectures is performed with the operator as the minimum structure, thereby reducing the amount of computation involved in the method and further reducing the running time of the server.

[0054] S103: For each candidate architecture, input the candidate architecture into a preset proxy model, and obtain performance parameters of the candidate architecture in a specified hardware environment through the proxy model as first performance parameters.

[0055] From the above content, it can be seen that in some examples, when determining the target architecture, the server can determine the performance parameters of the candidate architectures in a specified hardware environment, and based on the determined performance parameters, determine the optimal candidate architecture from each candidate architecture as the target architecture.

[0056] Specifically, the server can input each candidate architecture into a preset proxy model to obtain the performance parameters of the candidate architecture in a specified hardware environment through the proxy model as the first performance parameters. Exemplarily, the selection of the proxy model structure is not limited, and the candidate architecture can be input into any proxy model. The proxy models here can include: Multilayer Perceptron (MLP) model, Long Short-Term Memory (LSTM) model, Gated Recurrent Unit (GRU) model, Gradient Boosting Decision Tree (GBDT) model, etc.

[0057] It should be noted that the aforementioned proxy model can be a multi-tasking proxy model. Multi-tasking here means that a single model can output multiple performance parameter indicators. The server can use this multi-tasking proxy model to determine different performance parameters for the candidate architecture in a given hardware environment. These performance parameters include computational load, cache read and write times at each level, cache occupancy at each level, throughput, and push latency, as shown in Figure 3.

[0058] Figure 3 is a schematic diagram of the structure of the proxy model provided in this specification. For example, Figure 3 shows a block diagram of a multi-task proxy model for implementing binary relationship prediction. Those skilled in the art will appreciate that other proxy models are also possible, such as MLP models, LSTM models, and so on.

[0059] As can be seen from Figure 3, the proxy model can include a feature extraction layer and various decision layers. The server can input candidate architecture 0 and candidate architecture 1 into the preset proxy model, and obtain the features of candidate architecture 0 and candidate architecture 1 through the feature extraction layer of the proxy model.

[0060] Then, the feature representations corresponding to the two stacked candidate architectures can be input into each decision layer of the proxy model (such as decision layer 0 to decision layer n), so as to obtain the sub-first performance parameters (such as sub-first performance parameter 0 to sub-first performance parameter n) of the candidate architecture in the specified hardware environment through the decision layer, and obtain the first performance parameters of the candidate architecture in the specified hardware environment based on each sub-first performance parameter, wherein each sub-first performance parameter here is a different type of first performance parameter, for example: the above-mentioned amount of calculation is a sub-first performance parameter.

[0061] In Figure 3 It is the intermediate data obtained by the proxy model, which can be regarded as a binary vector. After Softmax probability normalization, the binary probability distribution vector related to the sub-first performance parameter can be obtained.

[0062] Furthermore, the input of the proxy model also includes multiple label data, the label value of the label data Normalized to distribution by Softmax probability As a supervised learning label, it is used to train the corresponding sub-first performance parameter. It can represent the binary relative relationship between architectures and the degree of their difference. For example, an inference latency label of (0.51, 0.49) means that architecture 0 is better than architecture 1, and the latency difference is not significant. Another example is (0.18, 0.82), which means that architecture 1 is significantly better than architecture 0 in inference efficiency.

[0063] According to the binary probability distribution vector corresponding to each indicator and binary relationship label values The Kullback-Leibler (KL) divergence is used to measure the binary distribution distance of each task, and finally a joint loss function (such as a weighted loss function) is used to implement supervised training to achieve multi-task joint prediction, such as inference latency, L1 / L2 / L3 cache consumption, throughput, and other tasks.

[0064] S104: Determine a weight of each candidate architecture based on the first performance parameters of each of the multiple candidate architectures, and select an architecture to be tested from the multiple candidate architectures based on the weights of each of the multiple candidate architectures.

[0065] Furthermore, the server may determine a weight of each candidate architecture according to the first performance parameter, and select an architecture to be tested from the candidate architectures according to the weight, as specifically shown in FIG4 .

[0066] Figure 4 is a schematic diagram of the process of determining the architecture to be tested provided in this specification. As can be seen from Figure 4, in actual application scenarios, the proxy model can be either a classification model or a regression model. Based on this, the server can determine a target screening strategy from various preset screening strategies based on the task type of the proxy model, where the task types include classification tasks and regression tasks. The server determines the weight of each candidate architecture based on the target screening strategy and the first performance parameter.

[0067] Among them, if the task type of the proxy model is a classification task, the confidence of the first performance parameter corresponding to each candidate architecture can be determined, and the weight of the candidate architecture can be determined based on the confidence. The lower the confidence of the first performance parameter corresponding to the candidate architecture, the higher the weight of the candidate architecture. It should be noted that the weight here refers to the priority used to screen whether testing / marking based on hardware is required. In other words, the lower the confidence, the more uncertain the prediction of the candidate architecture, and it may be necessary to mark it based on hardware.

[0068] If the task type of the proxy model is a regression task, the contribution of the first performance parameter corresponding to each candidate architecture can be determined, and the weight of the candidate architecture can be determined based on the contribution. Here, the higher the contribution of the first performance parameter corresponding to the candidate architecture, the higher the weight of the candidate architecture.

[0069] Among them, the contribution of the first performance parameter corresponding to the candidate architecture can adopt the expected model change maximization (EMCM) algorithm. For the candidate architecture, it is predicted that the candidate architecture will be used as the tested architecture, and the parameter change size of the proxy model is trained based on the tested architecture. Then, according to the predicted parameter change size, the contribution of the first performance parameter corresponding to the candidate architecture can be determined. Among them, the greater the predicted parameter change, the greater the contribution of the first performance parameter corresponding to the candidate architecture.

[0070] S105: Deploy a test model in the designated hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested.

[0071] From the above content, it can be seen that the server can screen out candidate architectures with low accuracy of the first performance parameter predicted by the proxy model, or with greater improvement on the proxy model, as the architecture to be tested, and then deploy the test model in a specified hardware environment according to the architecture to be tested to obtain the second performance parameter corresponding to the architecture to be tested. For example, low confidence is one of the active learning query strategies, indicating that the proxy model cannot make a good judgment (such as it cannot judge well that A is greater than B or A is less than B), so actual deployment and / or testing is required to obtain a relatively true second performance parameter. Based on the second performance parameter, not only can the true performance of the corresponding candidate architecture be determined, but the proxy model can also be further improved.

[0072] Furthermore, after obtaining the second performance parameters corresponding to the architecture to be tested, the server can not only screen out the target architecture from the candidate architectures according to the second performance parameters corresponding to the architecture to be tested through the optimizer, but also train the proxy model according to the second performance parameters corresponding to the architecture to be tested.

[0073] Specifically, the server may train the proxy model with the goal of minimizing the deviation between a first performance parameter corresponding to the architecture to be tested output by the proxy model and a second performance parameter corresponding to the architecture to be tested.

[0074] As can be seen from the above content, the training samples used by the server to train the proxy model are selected from various candidate architectures, and each candidate architecture is determined by the optimizer through a multi-objective optimization algorithm based on multiple optimization objectives. In some cases, this may lead to a certain generalization error in the proxy model trained using each architecture to be tested as training samples.

[0075] Therefore, the server can also sample multiple supplementary architectures from the search space through methods such as random sampling or network search sampling, and then obtain the first performance parameters of the supplementary architecture through the proxy model, and can build a supplementary model in a specified hardware environment according to the supplementary architecture to obtain the second performance parameters corresponding to the supplementary architecture.

[0076] Furthermore, the server can train the proxy model with the goal of minimizing the deviation between the first performance parameter corresponding to the supplementary architecture output by the proxy model and the second performance parameter corresponding to the supplementary architecture, thereby reducing the generalization error of the proxy model caused by using only the architecture to be tested as a training sample.

[0077] S106: Filtering a target architecture from a plurality of candidate architectures according to the second performance parameter corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures except the architecture to be tested.

[0078] S107: Construct a target model according to the target architecture.

[0079] Furthermore, the server can screen out the target architecture from each candidate architecture according to the second performance parameter corresponding to the to-be-tested architecture determined and the first performance parameters corresponding to other candidate architectures except the to-be-tested architecture, construct a target model according to the target architecture, and execute tasks through the target model.

[0080] Specifically, the server can determine the optimal candidate architecture or the Pareto-dominant candidate architecture from each candidate architecture according to the second performance parameter corresponding to the to-be-tested architecture determined and the first performance parameters corresponding to multiple candidate architectures except the to-be-tested architecture as the target architecture.

[0081] Exemplarily, in multi-objective optimization, a point on the Pareto front can be selected as the final target point. The definition of Pareto dominance can be roughly described as a multi-objective optimization problem with the objective function f(x)=(f1(x), f2(x),..., fn(x)), where x is the decision variable and fi(x) is the i-th objective function. For a solution x1, if there does not exist another solution x2 such that for all i = 1, 2,..., n, fi(x2) ≤ fi(x1) and there is at least one i such that fi(x2) < fi(x1), then the solution x1 is called a Pareto-dominant solution. The Pareto-dominant solution can be regarded as a compromise solution because there may not exist an optimal solution that makes all objectives reach the optimal state simultaneously.

[0082] After obtaining the relatively optimal target architecture, the server can perform complete training on the target architecture according to the dataset input by the user to obtain a target model. The target model includes trained parameters, such as various parameters corresponding to each atom in the architecture. Briefly, the target model can be a complete neural network model, and the user can directly use this neural network model to complete the tasks they expect to complete. For example, the model can be a model capable of product recommendation.

[0083] After constructing the target model, exemplarily, the server can output the specific details of the target model to the user, such as what type of architecture is adopted, various atomic operations included, parameters of each atomic operation, etc. So that the user can build the target model on software and hardware (such as the user's own device) according to these specific details.

[0084] It should be noted that the above surrogate model can be used to determine the first performance parameters of each candidate architecture in a specified hardware environment, while in actual application scenarios, it may be necessary to screen out the target architecture according to the first performance parameters of each candidate architecture in multiple specified hardware environments.

[0085] Exemplarily, the server can pre-train the proxy model through methods such as transfer learning, few-shot learning, and zero-shot learning, so that the proxy model can be based on the first performance parameters of each candidate architecture in a variety of specified hardware environments.

[0086] In addition, multiple proxy models can be deployed in the server, where each proxy model can be used to predict performance parameters of the candidate architecture in at least one specified hardware environment.

[0087] Specifically, the server can input the candidate architecture into each pre-trained proxy model for the candidate architecture, obtain the performance parameters of the candidate architecture in each specified hardware environment as each first performance parameter, determine the weight of the candidate architecture based on each first performance parameter, and screen out the architecture to be tested from each candidate architecture based on the weight, deploy the test model in each specified hardware environment according to the architecture to be tested to obtain the second performance parameters corresponding to the architecture to be tested in each hardware environment, and screen out the target architecture from each candidate architecture based on the second performance parameters corresponding to the architecture to be tested and the first performance parameters corresponding to the candidate architectures other than the architecture to be tested.

[0088] It should be noted that the above-mentioned proxy model can be deployed to the server after pre-training, and when the server responds to the received model building request to build the model, the first performance parameters of each candidate architecture in the specified hardware environment can be predicted online, thereby avoiding the problem of inaccurate predicted first performance parameters due to changes in architecture type, hardware environment, and target space (i.e., various optimization targets) in offline prediction.

[0089] Moreover, during the prediction process, the architecture to be tested can be screened out in real time, and the proxy model can be trained online based on the actual performance parameters of the architecture to be tested, that is, the second performance parameters, so as to gradually improve the accuracy of the first performance parameters predicted by the proxy model.

[0090] From the above content, it can be seen that the candidate architectures can be screened to screen out some candidate architectures whose performance parameters predicted by the proxy model have low accuracy, so as to obtain the true performance parameters of these candidate architectures by deploying the test model. For the remaining candidate architectures, the performance parameters of these candidate architectures can be directly obtained through the proxy model, thereby improving the efficiency of automatically building deep learning models and reducing the cost of obtaining the performance parameters of the candidate architectures.

[0091] The above is a model construction and image registration method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding model construction device, as shown in Figure 5.

[0092] FIG5 is a schematic diagram of a model building device provided in this specification, which includes the following modules.

[0093] Acquisition module 501, used to obtain a model building request;

[0094] A determination module 502 is configured to determine a plurality of candidate architectures according to the model building request;

[0095] A first evaluation module 503 is configured to input each candidate architecture into a preset proxy model, and obtain a performance parameter of the candidate architecture in a specified hardware environment through the proxy model as a first performance parameter;

[0096] a screening module 504, configured to determine a weight of each candidate architecture based on the first performance parameter of each of the plurality of candidate architectures, and screen an architecture to be tested from the plurality of candidate architectures based on the weights of each of the plurality of candidate architectures;

[0097] A second evaluation module 505 is configured to deploy a test model in the specified hardware environment according to the architecture to be tested, so as to obtain a second performance parameter corresponding to the architecture to be tested;

[0098] A decision module 506 is configured to select a target architecture from the plurality of candidate architectures based on the second performance parameter corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures other than the architecture to be tested;

[0099] The execution module 507 is configured to construct a target model according to the target architecture.

[0100] Optionally, the determination module 502 is specifically used to filter out atomic operations used to constitute each candidate architecture from a preset plurality of atomic operations according to the model building request, and the atomic operations include: at least one of: conventional convolution operation, separable convolution operation, average pooling operation, and maximum pooling operation.

[0101] Optionally, the determination module 502 is specifically used to determine multiple optimization targets based on the model building request, and the optimization targets are used to measure the multiple atomic operations and / or the candidate architectures; through a preset optimizer, obtain the atomic operations used to constitute each candidate architecture from the preset multiple atomic operations.

[0102] Optionally, the screening module 504 is specifically used to determine a target screening strategy from preset screening strategies based on the task type of the proxy model, where the task types include: classification tasks and regression tasks; and determine the weight of each candidate architecture based on the target screening strategy and the first performance parameter.

[0103] Optionally, the screening module 504 is specifically used to, when the task type is the classification task, determine the confidence of the first performance parameter corresponding to each candidate architecture for the first performance parameter corresponding to the candidate architecture; and determine the weight of each candidate architecture based on the confidence, wherein the target screening strategy is that the lower the confidence of the first performance parameter corresponding to a candidate architecture, the higher the weight of the candidate architecture.

[0104] Optionally, the screening module 504 is specifically used to, when the task type is the regression task, determine the contribution of the first performance parameter corresponding to each candidate architecture for the first performance parameter corresponding to the candidate architecture; and determine the weight of each candidate architecture based on the contribution, wherein the target screening strategy is that the higher the contribution of the first performance parameter corresponding to a candidate architecture, the higher the weight of the candidate architecture.

[0105] Optionally, the first evaluation module 503 is specifically used to, for each candidate architecture, input the candidate architecture into multiple proxy models to obtain performance parameters of the candidate architecture in multiple specified hardware environments as multiple first performance parameters, wherein each proxy model is used to predict the performance parameters of the candidate architecture in at least one of the specified hardware environments; the screening module 504 is specifically used to determine the weight of each candidate architecture based on the multiple first performance parameters of each of the multiple candidate architectures, and screen out the architecture to be tested from the multiple candidate architectures based on the weights of each of the multiple candidate architectures; the second evaluation module 505 is specifically used to deploy the test model in the multiple specified hardware environments according to the architecture to be tested to obtain multiple second performance parameters corresponding to the architecture to be tested in the multiple hardware environments; the decision module 506 is specifically used to screen out the target architecture from the multiple candidate architectures based on the multiple second performance parameters corresponding to the architecture to be tested and the multiple first performance parameters corresponding to other candidate architectures other than the architecture to be tested.

[0106] Optionally, the proxy model includes: a feature extraction layer and multiple decision layers, wherein different decision layers are used to determine different types of performance parameters of the candidate architecture in the specified hardware environment; the first evaluation module 503 is specifically used to input the candidate architecture into the feature extraction layer of the proxy model to obtain the feature representation of the candidate architecture output by the feature extraction layer; input the feature representation of the candidate architecture into the multiple decision layers of the proxy model to obtain multiple sub-first performance parameters of the candidate architecture in the specified hardware environment; and obtain the first performance parameter of the candidate architecture in the specified hardware environment based on the multiple sub-first performance parameters.

[0107] Optionally, the input of the proxy model further includes a plurality of label data, and the label data is used to train the corresponding sub-first performance parameters.

[0108] Optionally, the device also includes: a training module 508; the training module 508 is specifically used to train the proxy model with the goal of minimizing the deviation between the first performance parameter corresponding to the tested architecture output by the proxy model and the second performance parameter corresponding to the tested architecture.

[0109] Optionally, the training module 508 is specifically used to obtain multiple supplementary architectures; for each supplementary architecture, input the supplementary architecture into the proxy model, and obtain the performance parameters of the supplementary architecture in the specified hardware environment through the proxy model as the first performance parameters; deploy the test model in the specified hardware environment according to the supplementary test architecture to obtain the second performance parameters of the supplementary architecture; and further train the proxy model with the goal of minimizing the deviation between the first performance parameter corresponding to the supplementary architecture output by the proxy model and the second performance parameter corresponding to the supplementary architecture.

[0110] Optionally, the decision module 506 is specifically used to determine the optimal candidate architecture or the Pareto-dominant candidate architecture from the multiple candidate architectures as the target architecture based on the second performance parameters corresponding to the architecture to be tested and the first performance parameters corresponding to the other candidate architectures other than the architecture to be tested.

[0111] This specification also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute one of the methods provided in FIG. 1 above.

[0112] This specification also provides a schematic structural diagram of an electronic device corresponding to Figure 1, shown in Figure 6. As shown in Figure 6, at the hardware level, the electronic device includes a processor and memory. The memory may include internal memory and non-volatile memory. The electronic device may further include an internal bus, a network interface, and of course, other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it to implement the method described in Figure 1 above.

[0113] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0114] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly performed using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into the integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0115] The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0116] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0117] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0118] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0120] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0122] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0123] Memory may include non-permanent storage in a computer-readable medium, such as random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0124] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0125] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0126] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0128] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0129] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A model building method, It is characterized in that include: Get model building request; Determining a plurality of candidate architectures according to the model building request; For each candidate architecture, the candidate architecture is input into a preset proxy model, and a performance parameter of the candidate architecture in a specified hardware environment is obtained through the proxy model as a first performance parameter; Determine a weight of each candidate architecture according to the first performance parameter of each of the multiple candidate architectures, and select an architecture to be tested from the multiple candidate architectures according to the weights of each of the multiple candidate architectures; Deploy a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested; Filtering a target architecture from the multiple candidate architectures according to the second performance parameter corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures except the architecture to be tested; A target model is constructed according to the target architecture.

2. The method according to claim 1, It is characterized in that Determining the multiple candidate architectures according to the model building request specifically includes: According to the model building request, atomic operations for constituting each candidate architecture are screened out from a plurality of preset atomic operations, wherein the atomic operations include at least one of conventional convolution operations, separable convolution operations, average pooling operations, and maximum pooling operations.

3. The method according to claim 2, It is characterized in that According to the model building request, atomic operations for forming each candidate architecture are selected from the preset multiple atomic operations, specifically including: Determine, according to the model building request, a plurality of optimization targets, where the optimization targets are used to measure the plurality of atomic operations and / or the candidate architectures; The atomic operations for constituting each candidate architecture are obtained from the preset multiple atomic operations through a preset optimizer.

4. The method according to claim 1, It is characterized in that Determining the weight of each candidate architecture according to the first performance parameter of each of the multiple candidate architectures specifically includes: According to the task type of the proxy model, a target screening strategy is determined from preset screening strategies, wherein the task type includes: classification task and regression task; The weight of each candidate architecture is determined according to the target screening strategy and the first performance parameter.

5. The method according to claim 4, It is characterized in that Determining the weight of each candidate architecture according to the target screening strategy and the first performance parameter specifically includes: When the task type is the classification task, determining, for each first performance parameter corresponding to the candidate architecture, a confidence level of the first performance parameter corresponding to the candidate architecture; According to the confidence, the weight of each candidate architecture is determined, wherein the target screening strategy is that the lower the confidence of the first performance parameter corresponding to a candidate architecture, the higher the weight of the candidate architecture.

6. The method according to claim 4, It is characterized in that Determining the weight of each candidate architecture according to the target screening strategy and the first performance parameter specifically includes: When the task type is the regression task, determining, for each candidate architecture, a first performance parameter corresponding to the candidate architecture, a contribution of the first performance parameter corresponding to the candidate architecture; According to the contribution, the weight of each candidate architecture is determined, wherein the target screening strategy is that the higher the contribution of the first performance parameter corresponding to a candidate architecture, the higher the weight of the candidate architecture.

7. The method according to claim 1, It is characterized in that For each candidate architecture, the candidate architecture is input into the preset proxy model, and the performance parameter of the candidate architecture in the specified hardware environment is obtained through the proxy model as the first performance parameter, which specifically includes: For each candidate architecture, input the candidate architecture into a plurality of the proxy models to obtain performance parameters of the candidate architecture in a plurality of the specified hardware environments as the plurality of the first performance parameters, wherein each proxy model is used to predict the performance parameters of the candidate architecture in at least one of the specified hardware environments; Determining a weight of each candidate architecture according to the first performance parameters of each of the multiple candidate architectures, and selecting the architecture to be tested from the multiple candidate architectures according to the weights of each of the multiple candidate architectures, specifically includes: Determine a weight of each candidate architecture according to the plurality of first performance parameters of each of the plurality of candidate architectures, and select the architecture to be tested from the plurality of candidate architectures according to the weights of each of the plurality of candidate architectures; Deploying a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested specifically includes: Deploy a test model in the multiple specified hardware environments according to the architecture to be tested, so as to obtain multiple second performance parameters corresponding to the architecture to be tested in the multiple hardware environments; Filtering a target architecture from the multiple candidate architectures according to the second performance parameter corresponding to the architecture to be tested and the first performance parameters corresponding to other candidate architectures except the architecture to be tested specifically includes: The target architecture is selected from the multiple candidate architectures according to the multiple second performance parameters corresponding to the architecture to be tested and the multiple first performance parameters corresponding to other candidate architectures except the architecture to be tested.

8. The method according to claim 1, It is characterized in that The proxy model includes: a feature extraction layer, and multiple decision layers, wherein different decision layers are used to determine different types of performance parameters of the candidate architecture in the specified hardware environment; The candidate architecture is input into the preset proxy model, and the performance parameters of the candidate architecture in the specified hardware environment are obtained through the proxy model as the first performance parameters, which specifically include: Inputting the candidate architecture into the feature extraction layer of the proxy model to obtain a feature representation of the candidate architecture output by the feature extraction layer; Inputting the feature representation of the candidate architecture into the multiple decision layers of the proxy model to obtain multiple sub-first performance parameters of the candidate architecture in the specified hardware environment; The first performance parameter of the candidate architecture in the specified hardware environment is obtained according to the multiple first sub-performance parameters.

9. The method according to claim 8, It is characterized in that The input of the proxy model also includes a plurality of label data, and the label data is used to train the corresponding sub-first performance parameters.

10. The method according to claim 1, It is characterized in that The method further comprises: The proxy model is trained with the goal of minimizing the deviation between a first performance parameter corresponding to the architecture to be tested output by the proxy model and a second performance parameter corresponding to the architecture to be tested.

11. The method according to claim 10, It is characterized in that The method further comprises: Obtain multiple supplementary architectures; for each supplementary architecture, input the supplementary architecture into the proxy model, and obtain a performance parameter of the supplementary architecture in the specified hardware environment through the proxy model as a first performance parameter; Deploy a test model in the specified hardware environment according to the supplementary test architecture to obtain a second performance parameter of the supplementary architecture; The proxy model is further trained with the goal of minimizing the deviation between a first performance parameter corresponding to the supplementary architecture and a second performance parameter corresponding to the supplementary architecture output by the proxy model.

12. The method of claim 1, It is characterized in that Selecting the target architecture from the plurality of candidate architectures according to the second performance parameter corresponding to the architecture to be tested and the first performance parameter corresponding to the other candidate architectures except the architecture to be tested specifically includes: According to the second performance parameter corresponding to the architecture to be tested and the first performance parameter corresponding to the other candidate architectures except the architecture to be tested, an optimal candidate architecture or a Pareto-dominant candidate architecture is determined from the multiple candidate architectures as the target architecture.

13. A model building device, It is characterized in that include: The acquisition module is used to obtain the model building request; A determination module, configured to determine a plurality of candidate architectures according to the model building request; A first evaluation module is used to input each candidate architecture into a preset proxy model to obtain a performance parameter of the candidate architecture in a specified hardware environment as a first performance parameter; A screening module, configured to determine a weight of each candidate architecture according to the first performance parameter of each of the plurality of candidate architectures, and screen an architecture to be tested from the plurality of candidate architectures according to the weights of each of the plurality of candidate architectures; A second evaluation module is used to deploy a test model in the specified hardware environment according to the architecture to be tested to obtain a second performance parameter corresponding to the architecture to be tested; A decision module, configured to select a target architecture from the plurality of candidate architectures according to a second performance parameter corresponding to the architecture to be tested and first performance parameters corresponding to other candidate architectures except the architecture to be tested; An execution module is used to build a target model according to the target architecture.

14. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method described in any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Method and device for constructing model based on PU learning and prediction method and device

    CN110084374A

  • Neural network model structure searching method and device, electronic equipment and storage medium

    CN110909877A

  • Neural architecture search using a performance prediction neural network

    CN111406267A

  • Model recommendation method and device, equipment and computer storage medium

    CN113408634A

  • Pre-training model determination method and device, electronic equipment and storage medium

    CN113705628A

Cited By

  • Model deployment method and device, storage medium and electronic equipment

    CN119883295A

  • A model deployment method, device, storage medium, and electronic device

    CN119883295B

  • Method and system for constructing screening model and method and system for determining potential users

    CN121636802A