Hyper-parameter determination method and device, equipment and storage medium

By using the hyperparameters of the target historical training data set that are highly similar to the data set to be trained, the hyperparameter search range is determined, which solves the problem of low accuracy of hyperparameter configuration in the existing technology and improves the hyperparameter search efficiency of the machine learning model. and effect.

CN118569360APending Publication Date: 2024-08-30HANGZHOU HIKROBOT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410564851.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing technology has low accuracy when setting the hyperparameter search space, resulting in poor hyperparameter configuration efficiency and effect of the machine learning model.

Method used

By obtaining the hyperparameters of the target historical training data set that are highly similar to the data set to be trained as a reference, determine the hyperparameter search range, and use the hyperparameter search algorithm to find the target hyperparameters from this range to improve the accuracy of the hyperparameter search. and efficiency.

Benefits of technology

The accuracy of the hyperparameter search range is improved, the number of hyperparameter search trainings is reduced, the training time is reduced, and the search efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569360A
    Figure CN118569360A
Patent Text Reader

Abstract

The invention provides a hyper-parameter determination method and device, equipment and a storage medium, relates to the technical field of computers, and can improve the accuracy of a hyper-parameter search range. The method comprises the steps of obtaining a to-be-trained data set, and determining a hyper-parameter of a target historical model as a reference hyper-parameter under the condition that a plurality of historical training data sets comprise a target historical training data set; the similarity between the target historical training data set and the to-be-trained data set is larger than or equal to the preset similarity. The target historical model is a model obtained by training according to the target historical training data set. And determining a hyper-parameter search range based on the reference hyper-parameter, and determining a target hyper-parameter corresponding to the to-be-trained data set from the hyper-parameter search range based on a hyper-parameter search algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for determining a hyperparameter. Background Art

[0002] Machine learning, as the core of artificial intelligence (AI), is the fundamental way to make computers intelligent, and its applications are spread across all areas of artificial intelligence. In the process of machine learning, it is necessary to configure hyperparameters for the machine learning model before starting learning, so that the machine learning model can learn based on the configured hyperparameters. Hyperparameters define higher-level concepts about machine learning models, such as model complexity or learning ability. Therefore, selecting a set of optimal hyperparameters for machine learning models is crucial to improving the performance and effect of model learning. The set of optimal hyperparameters configured in the machine learning model is also called the hyperparameter configuration of the machine learning model.

[0003] In order to find the optimal hyperparameter combination, a preset search algorithm (such as a network search method) can be used to search for hyperparameters with higher accuracy in a pre-set hyperparameter search space. In the prior art, when setting the hyperparameter search space, the hyperparameter search space is usually set based on experience, which has low accuracy. Summary of the invention

[0004] Based on the above technical problems, the present application provides a method, device, equipment and storage medium for determining a hyperparameter, which can improve the accuracy of the hyperparameter search range.

[0005] In a first aspect, the present application provides a method for determining a hyperparameter, the method comprising: obtaining a data set to be trained. In the case where a target historical training data set is included in multiple historical training data sets, the hyperparameters of a target historical model are determined as reference hyperparameters. The target historical training data set is a historical training data set whose similarity to the data set to be trained is greater than or equal to a preset similarity. The target historical model is a model trained based on the target historical training data set. A hyperparameter search range is determined based on the reference hyperparameter. The hyperparameter search range includes the reference hyperparameter. Based on a hyperparameter search algorithm, the target hyperparameter corresponding to the data set to be trained is determined from the hyperparameter search range.

[0006] In this way, since the similarity between the data set to be trained and the target historical training data set is high, the hyperparameters corresponding to the two are also close, and the hyperparameters of the target historical model are used as reference hyperparameters to improve the accuracy of the hyperparameters of the data set to be trained. Subsequently, since the accuracy of the reference hyperparameters is high, the hyperparameter search range determined based on the reference hyperparameters also has a high accuracy, and based on the hyperparameter search algorithm, the target hyperparameter corresponding to the data set to be trained is determined from the hyperparameter search range. Therefore, compared to the hyperparameter search range set according to experience, the embodiment of the present application determines the hyperparameter search range based on the hyperparameter corresponding to the target historical training data set with high similarity to the data set to be trained, thereby improving the accuracy of the hyperparameter search range.

[0007] In a possible implementation, the method further includes: determining the content feature of each to-be-trained data in the to-be-trained data set based on the content feature extraction model. Determining the overall content feature of the to-be-trained data set according to the content feature of each to-be-trained data set in the to-be-trained data set, and obtaining the overall content feature of each historical training data set in multiple historical training data sets. Determining the similarity between the overall content feature of the to-be-trained data set and the overall content feature of each historical training data set according to the similarity between the overall content feature of the to-be-trained data set and the overall content feature of each historical training data set.

[0008] In a possible implementation, the method further includes: when the target historical training data set is not included in the multiple historical training data sets, obtaining the attribute characteristics of each training data in the data set to be trained, and determining the attribute characteristics of the data set to be trained based on the attribute characteristics of each training data. Determining the reference hyperparameter according to the attribute characteristics of the data set to be trained.

[0009] In a possible implementation, the method further includes: when the data set to be trained is used to train an image classification model, the data set to be trained includes a plurality of image data. The attribute feature is used to represent the image attribute of the image data. When the data set to be trained is used to train an image detection model, the data set to be trained includes a plurality of image data and an image label of each image data. The attribute feature is used to represent the image attribute of the image data and the label attribute of the image label.

[0010] In one possible implementation, the method also includes: when the target historical training data set is not included in multiple historical training data sets, determining the reference hyperparameters based on the classification identifier of the model to be trained and a preset mapping table; the model to be trained is a model used for training the data set to be trained, and the preset mapping table includes multiple classification identifiers and hyperparameters corresponding to each classification identifier.

[0011] In a possible implementation, determining a hyperparameter search range based on a reference hyperparameter includes: determining that the product of the reference hyperparameter and a first preset coefficient is the maximum hyperparameter of the hyperparameter search range. The first preset coefficient is greater than 1. Determining that the product of the reference hyperparameter and a second preset coefficient is the minimum hyperparameter of the hyperparameter search range. The second preset coefficient is less than 1 and greater than 0. Based on the maximum hyperparameter and the minimum hyperparameter, the hyperparameter search range is determined.

[0012] In a second aspect, the present application provides a determination device, which includes: an acquisition unit and a processing unit. The acquisition unit is used to acquire a data set to be trained. The processing unit is used to determine the hyperparameters of a target historical model as reference hyperparameters when a target historical training data set is included in multiple historical training data sets. The target historical training data set is a historical training data set whose similarity with the data set to be trained is greater than or equal to a preset similarity. The target historical model is a model trained based on the target historical training data set. The processing unit is also used to determine a hyperparameter search range based on the reference hyperparameters. The processing unit is also used to determine the target hyperparameter corresponding to the data set to be trained from the hyperparameter search range based on a hyperparameter search algorithm.

[0013] In a possible implementation, the processing unit is further used to: determine the content feature of each data to be trained in the data set to be trained based on the content feature extraction model. Determine the overall content feature of the data set to be trained based on the content feature of each data to be trained in the data set to be trained, and obtain the overall content feature of each historical training data set. Determine the similarity between the overall content feature of the data set to be trained and the overall content feature of each historical training data set based on the similarity between the overall content feature of the data set to be trained and the overall content feature of each historical training data set.

[0014] In a possible implementation, the acquisition unit is further used to acquire the attribute characteristics of each training data in the to-be-trained data set when the target historical training data set is not included in the multiple historical training data sets. The processing unit is further used to determine the attribute characteristics of the to-be-trained data set based on the attribute characteristics of each training data. The processing unit is further used to determine the reference hyperparameter according to the attribute characteristics of the to-be-trained data set.

[0015] In a possible implementation, when the data set to be trained is used to train an image classification model, the data set to be trained includes multiple image data. The attribute feature is used to represent the image attribute of the image data. When the data set to be trained is used to train an image detection model, the data set to be trained includes multiple image data and an image label of each image data. The attribute feature is used to represent the image attribute of the image data and the label attribute of the image label.

[0016] In one possible implementation, the processing unit is also used to determine the reference hyperparameters based on the classification identifier of the model to be trained and a preset mapping table when the target historical training data set is not included in the multiple historical training data sets; the model to be trained is the model used for training with the data set to be trained, and the preset mapping table includes multiple classification identifiers and hyperparameters corresponding to each classification identifier.

[0017] In a possible implementation, the processing unit is specifically configured to: determine that the product of the reference hyperparameter and the first preset coefficient is the maximum hyperparameter of the hyperparameter search range. The first preset coefficient is greater than 1. Determine that the product of the reference hyperparameter and the second preset coefficient is the minimum hyperparameter of the hyperparameter search range. The second preset coefficient is less than 1 and greater than 0. Determine the hyperparameter search range based on the maximum hyperparameter and the minimum hyperparameter.

[0018] In a third aspect, the present application provides a server, the electronic device comprising a processor and a memory. The memory stores instructions executable by the processor. When the processor is configured to execute the instructions, the electronic device implements the determination method of the first aspect.

[0019] In a fourth aspect, the present application provides a computer program product. When the computer program product is executed in an electronic device, the electronic device executes the method related to the first aspect to implement the determination method of the first aspect.

[0020] In a fifth aspect, the present application provides a readable storage medium, the readable storage medium comprising: software instructions. When the software instructions are executed in an electronic device, the electronic device implements the determination method of the first aspect.

[0021] The beneficial effects of the second to fifth aspects mentioned above can be referred to the first aspect and will not be elaborated on again. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A schematic diagram of the composition of a hyper-parameter determination system provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of the workflow of a hyperparameter determination system provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of the composition of a server provided in an embodiment of the present application;

[0026] Figure 4 One of the flow charts of a method for determining a hyperparameter provided in an embodiment of the present application;

[0027] Figure 5 A second flow chart of a method for determining a hyperparameter provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of the composition of a determination device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0031] In addition, in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0032] Before explaining the embodiments of the present application in detail, some relevant terms and related technologies involved in the embodiments of the present application are first introduced.

[0033] Deep learning: refers specifically to deep neural networks, a technology in the field of machine learning. Deep learning is the study of the inherent laws and representation levels of sample data. The information obtained in the learning process is of great help in interpreting data such as text, images, and sounds. Its ultimate goal is to enable machines to have analytical learning capabilities like humans and to be able to recognize data such as text, images, and sounds.

[0034] Currently, commonly used deep learning models include convolutional neural network models, recurrent neural network models, and stacked autoencoder network models.

[0035] In the implementation of this application, the features of the image are extracted through the feature extraction network of the deep learning model to obtain the feature vector of the image.

[0036] Hyperparameters: refers to the parameter values ​​set before deep learning begins. This parameter does not need to be obtained through training. Usually, it is necessary to optimize the hyperparameters and select a set of optimal hyperparameters for the learning machine to improve the performance and effect of learning.

[0037] For different deep learning models, different hyperparameter combinations can be set.

[0038] Exemplary hyperparameters include: the number of trees or the depth of the trees, the number of latent factors in matrix factorization, the learning rate (multiple modes), the number of hidden layers in a deep neural network, the number of clusters in k-means clustering, etc.

[0039] Hyperparameter group: refers to a set of hyperparameters used when training a model.

[0040] Hyperparameter search: A technique called hyperparameter optimization (HPO), which usually searches for hyperparameter configurations that perform well on a single dataset.

[0041] Currently, commonly used techniques for hyperparameter search include grid search, Bayesian optimization, and random search.

[0042] Image dataset: A dataset consisting of images.

[0043] In some embodiments, the image dataset indicates an already labeled dataset.

[0044] Annotation: refers to adding label information to image data in some way, such as image content, category, target location, etc.

[0045] Exemplarily, the image data label may include one or more of an image, an object category, an object box, and an object mask.

[0046] Model: trained with a specific set of trainable parameters.

[0047] In some embodiments, the model outputs prediction information based on an input image.

[0048] Training set: specifically refers to the data set used for model training.

[0049] Batch size: The number of samples selected for one training.

[0050] Epoch: One epoch is equal to training once using all samples in the training set.

[0051] As the core of artificial intelligence, machine learning is the fundamental way to make computers intelligent, and its applications are spread across all areas of artificial intelligence. In the process of machine learning, it is necessary to configure hyperparameters for the machine learning model before starting learning, so that the machine learning model can learn based on the configured hyperparameters. Hyperparameters define higher-level concepts about machine learning models, such as model complexity or learning ability. Therefore, selecting a set of optimal hyperparameters for machine learning models is crucial to improving the performance and effect of model learning. The set of optimal hyperparameters configured in the machine learning model is also called the hyperparameter configuration of the machine learning model.

[0052] In order to find the optimal hyperparameter combination, a preset search algorithm (such as a network search method) is used to search for hyperparameters with higher accuracy in a pre-set hyperparameter search space. In the prior art, when setting the hyperparameter search space, the hyperparameter search space is usually set based on experience, which has low accuracy.

[0053] In view of the above problems, an embodiment of the present application provides a method for determining a hyperparameter, the method comprising: obtaining a data set to be trained. In the case where a target historical training data set is included in multiple historical training data sets, the hyperparameters of the target historical model are determined as reference hyperparameters. The target historical training data set is a historical training data set whose similarity with the data set to be trained is greater than or equal to a preset similarity. The target historical model is a model trained based on the target historical training data set. Determine a hyperparameter search range to which the reference hyperparameter belongs, and determine the target hyperparameter corresponding to the data set to be trained from the hyperparameter search range based on a hyperparameter search algorithm.

[0054] In this way, since the similarity between the data set to be trained and the target historical training data set is high, the hyperparameters corresponding to the two are also close, and the hyperparameters of the target historical model are used as reference hyperparameters to improve the accuracy of the hyperparameters of the data set to be trained. Subsequently, since the accuracy of the reference hyperparameters is high, the hyperparameter search range determined based on the reference hyperparameters also has a high accuracy, and based on the hyperparameter search algorithm, the target hyperparameter corresponding to the data set to be trained is determined from the hyperparameter search range. Therefore, compared to the hyperparameter search range set according to experience, the embodiment of the present application determines the hyperparameter search range based on the hyperparameter corresponding to the target historical training data set with high similarity to the data set to be trained, thereby improving the accuracy of the hyperparameter search range.

[0055] In addition, since the accuracy of the reference hyperparameters is high, it is only necessary to set a smaller hyperparameter search range based on the reference hyperparameters to cover the target hyperparameters. In this way, based on a smaller hyperparameter search range, the number of hyperparameter search trainings for the training data set can be reduced, thereby greatly reducing the training time required for the hyperparameter search and improving the efficiency of the hyperparameter search.

[0056] The method for determining the hyperparameters provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0057] The method for determining the hyperparameter provided in the embodiment of the present application can be applied to the hyperparameter determination system. Figure 1 A structural diagram of the hyperparameter determination system is shown in FIG. Figure 1 As shown, the hyper-parameter determination system 100 includes a server 101 and a database 102. The server 101 is connected to the database 102.

[0058] The server 101 is used to obtain a data set to be trained, and when a target historical training data set is included in multiple historical training data sets, the hyperparameters of the target historical model are determined as reference hyperparameters. The target historical training data set is a historical training data set whose similarity with the data set to be trained is greater than or equal to a preset similarity. The target historical model is a model trained according to the target historical training data set. The server 101 is also used to determine a hyperparameter search range based on the reference hyperparameters, and determine the target hyperparameter corresponding to the data set to be trained from the hyperparameter search range based on the hyperparameter search algorithm. In some embodiments, the database 102 is used to store historical model parameters. The historical model parameters include historical training data sets, features of the historical training data sets, and hyperparameters corresponding to the historical training data sets.

[0059] In some embodiments, the workflow of the hyperparameter determination system 100 can be as follows: Figure 2 shown.

[0060] For example, in Figure 2In the example, database 102 stores three historical model parameters: historical model parameter P1 (historical model parameter P1 includes historical training data set 1 and hyperparameter 1), historical model parameter P2 (historical model parameter P2 includes historical training data set 2 and hyperparameter 2), and historical model parameter P3 (historical model parameter P3 includes historical training data set 3 and hyperparameter 3). Server 101 reads three historical model parameters from database 102, and when it is determined that the similarity between historical training data set 1 and the data set to be trained is greater than or equal to the preset similarity, hyperparameter 1 is determined as the reference hyperparameter, and the hyperparameter search range is determined based on hyperparameter 1. Further, server 101 determines the target hyperparameter corresponding to the data set to be trained from the hyperparameter search range based on the hyperparameter search algorithm: hyperparameter 4. Subsequently, server 101 sends the data set to be trained and hyperparameter 4 to database 102. Accordingly, upon receiving the data set to be trained and the hyperparameter 4 sent by the server 101, the database 102 updates the historical model parameters to increase the historical model parameters P4 (the historical model parameters P4 include the historical training data set 4 (i.e., the data set to be trained) and the hyperparameter 4). In some embodiments, the database 102 may be configured in the server 101.

[0061] In some embodiments, when the target hyperparameter is determined, the server 101 configures the target hyperparameter to the corresponding target model. Subsequently, the server 101 trains the training data set based on the configured target model to obtain a training result.

[0062] For example, the configured target model is a classification model. The server 101 is used to input a plurality of images (such as Figure 1 As shown, the training data set including image 1, image 2 ... image N) is classified to obtain the classification results, and two types of data (such as Figure 1 As shown, images of category 1 and images of category 2 are obtained).

[0063] The server in the embodiment of the present application may be a single server, or may be a server cluster consisting of multiple servers. In some implementations, the server cluster may also be a distributed cluster. Optionally, the server 101 may also be implemented on a cloud platform, for example, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, and a multi-cloud, or any combination thereof. The embodiment of the present application is not limited to this.

[0064] Figure 3 The following is a schematic diagram of the composition of the server provided in the embodiment of the present application. Figure 3As shown, the server may include: a processor 20 , a memory 21 , a communication line 22 , a communication interface 23 , and an input / output interface 24 .

[0065] The processor 20 , the memory 21 , the communication interface 23 and the input / output interface 24 may be connected via a communication line 22 .

[0066] The processor 20 is used to execute the instructions stored in the memory 21 to implement the fault analysis method provided in the following embodiments of the present application. The processor 20 can be a CPU, a general-purpose processor network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller (MCU) / single chip microcomputer, a programmable logic device (PLD), or any combination thereof. The processor 20 can also be any other device with processing functions, such as a circuit, a device, or a software module, which is not limited in the embodiments of the present application. In one example, the processor 20 may include one or more CPUs, such as Figure 3 As an optional implementation, the server may include multiple processors, for example, in addition to processor 20, it may also include processor 25 ( Figure 3 The dashed line is used as an example.

[0067] The memory 21 is used to store instructions. For example, the instructions may be computer programs. Optionally, the memory 21 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage devices, etc., and the embodiments of the present application are not limited to this.

[0068] It should be noted that the memory 21 may exist independently of the processor 20, or may be integrated with the processor 20. The memory 21 may be located inside the server, or may be located outside the server, which is not limited in the embodiment of the present application.

[0069] The communication line 22 is used to transmit information between the various components included in the server.

[0070] The communication interface 23 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The communication interface 23 may be a module, a circuit, a transceiver or any device capable of achieving communication.

[0071] The input / output interface 24 is used to implement human-computer interaction between the user and the server, for example, to implement action interaction or information interaction between the user and the server.

[0072] Exemplarily, the input / output interface 24 may be a mouse, a keyboard, a display screen, or a touch display screen, etc. Action interaction or information interaction between a user and a server may be achieved through a mouse, a keyboard, a display screen, or a touch display screen, etc.

[0073] It should be noted that Figure 3 The structure shown in the figure does not constitute a limitation on the server, except Figure 3 In addition to the components shown, the server may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components.

[0074] The following is an introduction to the method for determining the hyperparameters provided in the embodiments of the present application.

[0075] Figure 4 A schematic diagram of a process for determining a hyperparameter provided in an embodiment of the present application. The method for determining a hyperparameter provided in an embodiment of the present application includes: S301-S304.

[0076] S301, obtaining a data set to be trained.

[0077] The data set to be trained may be a text training data set, an image training data set, a video training data set, or a voice training data set.

[0078] In some embodiments, the server obtains the data set to be trained in response to an input operation.

[0079] In other embodiments, the server collects data in a preset format based on a preset data collection algorithm to obtain a data set to be trained.

[0080] For example, taking the to-be-trained data set as an image training data set as an example, the server collects multiple images based on a preset image acquisition algorithm to obtain a to-be-trained data set including multiple images.

[0081] As another example, taking the data set to be trained as a text training data set as an example, the server collects multiple texts based on a preset text collection algorithm to obtain a data set to be trained including the multiple texts.

[0082] The embodiments of the present application do not specifically limit the specific data content of the training data set and how to obtain the training data set.

[0083] S302: When the target historical training data set is included in the multiple historical training data sets, determine the hyperparameters of the target historical model as reference hyperparameters.

[0084] The target historical training data set is a historical training data set whose similarity with the data set to be trained is greater than or equal to a preset similarity. The target historical model is a model trained based on the target historical training data set.

[0085] As a possible implementation method, when obtaining the data set to be trained, the server determines the similarity between the data set to be trained and each of the multiple historical training data sets, and determines whether the multiple historical training data sets include the target historical training data set. Further, when the multiple historical training data sets include the target historical training data set, the server determines the hyperparameters of the target historical model as the reference hyperparameters.

[0086] For example, the preset similarity is a, and the multiple historical training data sets include 15 historical data sets. The server calculates the similarity between the training data set and each of the 15 historical training data sets, and obtains 15 similarities. Further, the server determines the similarity greater than a among the 15 similarities as the target similarity, and determines the historical training data set corresponding to the target similarity as the target historical training data set.

[0087] In some embodiments, the server determines the content features of each data to be trained in the data set to be trained based on the content feature extraction model. Further, the server determines the overall content features of the data set to be trained based on the content features of each data to be trained in the data set to be trained, and obtains the overall content features of each historical training data set. Subsequently, the server determines the similarity between the data set to be trained and each historical training data set based on the similarity between the overall content features of the data set to be trained and the overall content features of each historical training data set.

[0088] The content features in the embodiments of the present application are used to characterize the content information of the data. For example, the data set to be trained includes multiple image data, and the content features of the data set to be trained may include at least one of the texture features, shape features, and spatial relationship features of the image. For another example, the data set to be trained includes multiple texts, and the content features of the data set to be trained may include at least one of the sentiment value, fluency, and word frequency of the target word of the text.

[0089] In other embodiments, the server determines the attribute features of each data to be trained in the data set to be trained based on the attribute feature extraction model. Further, the server determines the overall attribute features of the data set to be trained based on the attribute features of each data to be trained in the data set to be trained, and obtains the attribute features of each historical training data set. Subsequently, the server determines the similarity between the data set to be trained and each historical training data set based on the similarity between the attribute features of the data set to be trained and the attribute features of each historical training data set.

[0090] The attribute features in the embodiments of the present application are used to characterize the attribute information of the data. For example, the data set to be trained includes multiple image data, and the attribute features of the data set to be trained may include image attributes and label attributes of image labels. For another example, the data set to be trained includes multiple texts, and the attribute features of the data set to be trained may include at least one of the total number of words, fonts, and number of paragraphs in the text. In some embodiments, when the similarity between multiple historical training data sets and the data set to be trained is greater than or equal to a preset similarity, the historical training data set with the greatest similarity to the data set to be trained is determined as the target historical training data set. Alternatively, when the similarity between multiple historical training data sets and the data set to be trained is greater than or equal to a preset similarity, a historical training data set is randomly determined from multiple historical training data sets as the target historical training data set. In this regard, the embodiments of the present application do not make specific limitations.

[0091] In another case, the server obtains the overall content features of the data set to be trained, and determines the reference hyperparameter based on the overall content features of the data set to be trained. In some embodiments, the server inputs the overall content features of the data set to be trained into a first preset parameter determination algorithm to obtain the reference hyperparameter. In some embodiments, the server determines the reference hyperparameter from a first preset mapping relationship table based on the overall content features of the data set to be trained. The first preset mapping relationship table includes a plurality of overall content features and hyperparameters corresponding to each overall content feature.

[0092] In another case, the server obtains the attribute characteristics of the data set to be trained, and determines the reference hyperparameter based on the attribute characteristics of the data set to be trained. In some embodiments, the server inputs the attribute characteristics of the data set to be trained into the second preset parameter determination algorithm to obtain the reference hyperparameter. In some embodiments, the server determines the reference hyperparameter from the second preset mapping relationship table based on the attribute characteristics of the data set to be trained. The second preset mapping relationship table includes multiple attribute characteristics and hyperparameters corresponding to each attribute characteristic.

[0093] S303. Determine a hyperparameter search range based on a reference hyperparameter.

[0094] The hyperparameter search scope includes the reference hyperparameter.

[0095] In some embodiments, the product of the reference hyperparameter and the first preset coefficient is determined as the maximum hyperparameter of the hyperparameter search range. The first preset coefficient is greater than 1. The product of the reference hyperparameter and the second preset coefficient is determined as the minimum hyperparameter of the hyperparameter search range. The second preset coefficient is less than 1 and greater than 0. Based on the maximum hyperparameter and the minimum hyperparameter, the hyperparameter search range is determined.

[0096] For example, take the learning rate as b and the number of iterations as c. The server determines that the maximum hyperparameter of the learning rate is 2*b and the minimum hyperparameter is 0.5*b, that is, [0.5*b, 2*b]. The server determines that the maximum hyperparameter of the number of iterations is 1.25*c and the minimum hyperparameter is 0.75*c, that is, [0.75*c, 1.25*c].

[0097] It should be noted that the first preset coefficient and the second preset coefficient are pre-configured by operation and maintenance personnel, and the embodiment of the present application does not specifically limit the first preset coefficient and the second preset coefficient.

[0098] In some other embodiments, the sum of the reference hyperparameter and the first adjustment parameter is determined as the maximum hyperparameter of the hyperparameter search range. The difference between the reference hyperparameter and the second adjustment parameter is determined as the minimum hyperparameter of the hyperparameter search range. The first adjustment parameter and the second adjustment parameter are positive numbers. Based on the maximum hyperparameter and the minimum hyperparameter, the hyperparameter search range is determined.

[0099] It should be noted that the first adjustment parameter and the second adjustment parameter are pre-configured by the operation and maintenance personnel, and the embodiment of the present application does not specifically limit the first adjustment parameter and the second adjustment parameter.

[0100] S304: Based on the hyperparameter search algorithm, determine the target hyperparameter corresponding to the training data set from the hyperparameter search range.

[0101] In some embodiments, after obtaining the hyperparameter search range, the server determines the target hyperparameter corresponding to the data set to be trained from the hyperparameter search range based on the hyperparameter search algorithm.

[0102] Exemplarily, the hyperparameter search algorithm is any one of the following algorithms: genetic algorithm, Bayesian optimization algorithm, differential evolution algorithm, grid search algorithm, random search algorithm.

[0103] The method for determining the hyperparameters provided in the embodiment of the present application can at least bring the following beneficial effects: since the similarity between the data set to be trained and the target historical training data set is high, the hyperparameters corresponding to the two are also close, and the hyperparameters of the target historical model are used as reference hyperparameters to improve the accuracy of the hyperparameters of the data set to be trained. Subsequently, since the accuracy of the reference hyperparameters is high, the hyperparameter search range determined based on the reference hyperparameters also has a high accuracy, and based on the hyperparameter search algorithm, the target hyperparameter corresponding to the data set to be trained is determined from the hyperparameter search range. Therefore, compared to the hyperparameter search range set according to experience, the embodiment of the present application determines the hyperparameter search range based on the hyperparameter corresponding to the target historical training data set with high similarity to the data set to be trained, thereby improving the accuracy of the hyperparameter search range.

[0104] In a possible design, in order to find a historical training data set with a high similarity to the training data set, after step S301, the method further includes the following steps S305-S306:

[0105] S305: Acquire multiple historical training data sets.

[0106] In some embodiments, the server obtains multiple historical training data sets and overall content features of each of the multiple historical training data sets from a database.

[0107] S306: Determine the similarity between the dataset to be trained and each of the multiple historical training datasets.

[0108] In some embodiments, the server determines the content features of each data to be trained in the data set to be trained based on the content feature extraction model. Further, the server determines the overall content features of the data set to be trained based on the content features of each data to be trained in the data set to be trained, and obtains the overall content features of each historical training data set. Subsequently, the server determines the similarity between the data set to be trained and each historical training data set based on the similarity between the overall content features of the data set to be trained and the overall content features of each historical training data set.

[0109] It can be understood that the server obtains multiple historical training data sets, and calculates the similarity between the data set to be trained and each historical training data set, so as to find a historical training data set with a higher similarity to the data set to be trained.

[0110] In one design, in order to obtain a historical training data set similar to the data set to be trained, the above step S306 may specifically include the following steps S3061-S3064:

[0111] S3061. Determine the content feature of each to-be-trained data in the to-be-trained data set based on the content feature extraction model.

[0112] As a possible implementation method, when obtaining each data set to be trained, the server inputs each data to be trained in the data set to be trained into a content feature extraction model to obtain the content feature of each data to be trained.

[0113] For example, the content feature is a feature vector, the training data set includes multiple image data, and the content feature extraction model is a ResNet50 model. The server inputs the multiple image data into the ResNet50 model to obtain a feature vector for each image.

[0114] Exemplary, take the data as an image. Content features are used to characterize the content of the image. For example, content features may include texture features, shape features, spatial relationship features, etc. of the image. Texture features describe the surface properties of the target (such as scenery, people, objects, etc.) corresponding to the image or image area. There are two types of representation methods for shape features, one is contour features and the other is regional features. Contour features are mainly aimed at the outer boundaries of the target, while regional features are related to the entire shape area of ​​the target. Spatial relationship features refer to the spatial position or relative direction relationship between multiple targets segmented from the image. These relationships can also be divided into connection / adjacency relationships, overlap / overlapping relationships, and inclusion / inclusion relationships.

[0115] S3062: Determine the overall content feature of the data set to be trained based on the content feature of each data set to be trained in the data set to be trained.

[0116] In some embodiments, after obtaining the content features of each data set to be trained, the server adds and averages the content features of each data set to be trained to obtain the overall content features of the data set to be trained.

[0117] For example, taking the content feature as a feature vector and the to-be-trained data set including 10 images as an example, when the service area obtains 10 feature vectors, it determines the average feature vector of the 10 feature vectors as the overall feature vector of the to-be-trained data set.

[0118] In some embodiments, when obtaining the content feature of each data set to be trained, the server determines the median content feature of the content feature of each data set to be trained as the overall content feature of the data set to be trained.

[0119] For example, taking the content feature as a feature vector and the to-be-trained data set including 10 images as an example, when the service area obtains 10 feature vectors, it determines the median feature vector among the 10 feature vectors as the overall feature vector of the to-be-trained data set.

[0120] S3063. Obtain the overall content features of each historical training data set.

[0121] As a possible implementation method, the server obtains the overall content characteristics of each historical training data set from the database.

[0122] S3064: Determine the similarity between the data set to be trained and each historical training data set based on the similarity between the overall content features of the data set to be trained and the overall content features of each historical training data set.

[0123] As a possible implementation method, the server calculates the similarity between the overall content characteristics of the data set to be trained and the overall content characteristics of each historical training data set, and determines the similarity between the overall content characteristics of the data set to be trained and the overall content characteristics of each historical training data set as the similarity between the data set to be trained and each historical training data set.

[0124] In some embodiments, the overall content feature of the dataset to be trained is a feature vector of the dataset to be trained. The server calculates the cosine distance between the feature vector of the dataset to be trained and the feature vector of each historical training dataset, and determines the cosine distance between the feature vector of the dataset to be trained and the feature vector of each historical training dataset as the similarity between the dataset to be trained and each historical training dataset.

[0125] For example, the multiple historical training data sets are 10 historical training data sets. The server obtains the feature vector of the data set to be trained and the feature vectors of the 10 historical training data sets, and calculates the cosine distance between the feature vector of the data set to be trained and the feature vector of each historical training data set to obtain 10 cosine distances. Further, the server uses the 10 cosine distances as the similarity between the data set to be trained and the 10 historical training data sets.

[0126] Subsequently, the server determines a cosine distance greater than or equal to a preset cosine distance among the 10 cosine distances as a target cosine distance, and determines a historical training data set corresponding to the target cosine distance as a target historical training data set.

[0127] It is understandable that the server determines a historical training data set with similar content to the data set to be trained based on the content features of the data set to be trained and the similarity of the content features of multiple historical training data sets. In this way, the hyperparameters of the historical training data set with similar content to the data set to be trained are determined as reference hyperparameters, which improves the accuracy of the hyperparameters and further improves the accuracy of the hyperparameter search range.

[0128] In one design, in order to determine the hyperparameter search range, the above step S303 may specifically include the following steps S3031-S3033:

[0129] S3031. Determine that the product of the reference hyperparameter and the first preset coefficient is the maximum hyperparameter in the hyperparameter search range.

[0130] S3032. Determine that the product of the reference hyperparameter and the second preset coefficient is the minimum hyperparameter in the hyperparameter search range.

[0131] S3033. Determine the hyperparameter search range based on the maximum hyperparameter and the minimum hyperparameter.

[0132] It should be noted that the first preset coefficient and the second preset coefficient are pre-set in the server by the operation and maintenance personnel. When the reference hyperparameter includes multiple hyperparameters, the first preset coefficient corresponding to each reference hyperparameter may be the same or different; the second preset coefficient corresponding to each reference hyperparameter may be the same or different. This embodiment of the application does not limit this.

[0133] It can be understood that the maximum hyperparameter of the hyperparameter search range and the minimum hyperparameter of the hyperparameter search range are determined according to the reference hyperparameter, so as to determine the hyperparameter search range. In this way, when the reference hyperparameter is already a better hyperparameter, the search range determined based on the reference hyperparameter increases the hyperparameter search range.

[0134] In a possible design, the method for determining a hyperparameter provided in the embodiment of the present application further includes the following step S307:

[0135] S307: When the target historical training data set is not included in the multiple historical training data sets, a preset hyperparameter is determined as a reference hyperparameter.

[0136] It should be noted that the preset hyperparameters are pre-set by the operation and maintenance personnel and stored in the server. For example, the preset hyperparameters can be the mean of the hyperparameters of multiple historical models, or the median of the hyperparameters of multiple historical models, which is not limited in the embodiments of the present application.

[0137] It can be understood that when multiple historical training data sets have low similarity with the data set to be trained, a preset hyperparameter is configured for the data set to be trained, and the preset hyperparameter is determined as the reference hyperparameter, thereby improving the accuracy of the hyperparameter search range.

[0138] In a possible design, in order to improve the accuracy of the hyperparameter search range, the hyperparameter determination method provided in the embodiment of the present application further includes the following steps S308-S310:

[0139] S308: When the target historical training data set is not included in the multiple historical training data sets, obtain attribute features of each training data in the data set to be trained.

[0140] As a possible implementation, the dataset to be trained includes multiple image data. When the multiple historical training datasets do not include the target historical training dataset, the server obtains attribute features of each training data in the dataset to be trained. The attribute features include image attributes and / or label attributes.

[0141] In some embodiments, the server determines the content of the attribute features according to the category of the model obtained by training the data to be trained. For example, in the case where the data set to be trained is used to train an image classification model, the data set to be trained includes multiple image data, and the server obtains the image attributes of each image data in the multiple image data. For another example, in the case where the data set to be trained is used to train an image detection model, the data set to be trained includes multiple image data and image labels of each image data. The server obtains the image label of each image data and the label attributes of the image label. The embodiment of the present application does not limit the image attributes, image labels, and label attributes of the image labels. For example, the image attributes may include at least one of length, width, aspect ratio, area, grayscale, color, color distribution, and grayscale histogram. The image label may include at least one of a sub-image, a target category, a target frame, and a target mask. Taking the image label as a target frame as an example, the label attributes of the target frame include at least one of length, width, area, category, and aspect ratio. Taking the image label as a sub-image as an example, the label attributes of the sub-image include at least one of size, area, category, shape, and color.

[0142] S309: Determine the attribute characteristics of the data set to be trained based on the attribute characteristics of each training data.

[0143] As a possible implementation manner, the server determines the attribute features of the data set to be trained based on the attribute features of each training data after obtaining the attribute features of each training data.

[0144] In some embodiments, the data set to be trained includes a plurality of image data. The server calculates the average attribute features of the plurality of images while obtaining the attribute features of each image.

[0145] Exemplarily, the server obtains the length, width and aspect ratio of each of the 10 images, and calculates the average value of the length, the average value of the width and the average value of the aspect ratio of the 10 images one by one. Further, the server uses the average value of the length, the average value of the width and the average value of the aspect ratio of the 10 images as the attribute features of the training data set.

[0146] Exemplarily, the server obtains the length, width and aspect ratio of each of the 10 images, and the length, width and area of ​​the 10 target boxes. Further, the server uses the average value of the length, width and aspect ratio of the 10 images, and the average value of the length, width and area of ​​the 10 target boxes as attribute features of the training data set.

[0147] In some embodiments, the data set to be trained includes multiple image data. When the server obtains the attribute feature of each image, it uses the median image attribute of the multiple attribute features as the attribute feature of the data to be trained.

[0148] Exemplarily, the server obtains the length of each image data in 10 images, and uses the median of the 10 lengths as the length of the data set to be trained.

[0149] S310: Determine reference hyperparameters according to the attribute characteristics of the data set to be trained.

[0150] As a possible implementation method, the server inputs the attribute characteristics of the data set to be trained into the second preset parameter determination algorithm and outputs the reference hyperparameters.

[0151] In some embodiments, when acquiring attribute features of a plurality of image data, the server inputs the attribute features of the plurality of image data into a second preset parameter determination algorithm and outputs a reference hyperparameter.

[0152] In some embodiments, after obtaining attribute features of multiple image data and label attributes of image labels, the server inputs the attribute features of multiple image data and label attributes of image labels into a second preset parameter determination algorithm and outputs a reference hyperparameter.

[0153] As another possible implementation method, the server determines the reference hyperparameter from the second preset mapping relationship table based on the attribute characteristics of the training data set. The second preset mapping relationship table includes multiple attribute characteristics and hyperparameters corresponding to each attribute characteristic.

[0154] It can be understood that the reference hyperparameter is determined based on the attribute characteristics of the dataset to be trained, and further, the hyperparameter search range to which the reference hyperparameter belongs is determined. In this way, since the reference hyperparameter is determined based on the attribute characteristics of the dataset to be trained, the reference hyperparameter is more closely matched to the dataset to be trained, so that the reference hyperparameter is already a better hyperparameter, thereby improving the accuracy of the hyperparameter range.

[0155] In one design, in order to improve the accuracy of the hyperparameter range. In the determination method provided by the embodiment of the present application, when the data set to be trained is used to train an image classification model, the data set to be trained includes multiple image data. The attribute feature is used to represent the image attribute of the image data. When the data set to be trained is used to train an image detection model, the data set to be trained includes multiple image data and an image label of each image data. The attribute feature is used to represent the image attribute of the image data and the label attribute of the image label.

[0156] In some embodiments, when the server obtains the data set to be trained, it determines the type of model that the data set to be trained is used to train. When the data set to be trained is used to train an image classification model, the server obtains the image attributes of the image; when the data set to be trained is used to train an image detection model, the server obtains the image attributes of the image and the label attributes of the image label.

[0157] It is understandable that the server determines the reference hyperparameters based on different attribute features for the training data sets of different task types. In particular, when detecting images in the training data set, the attribute features of the images include image attributes and label attributes of the image labels, which increases the dimension of the attribute features of the images, thereby improving the accuracy of the hyperparameter range.

[0158] In a possible design, in order to determine the reference hyperparameter, the method provided in the embodiment of the present application further includes the following steps S311:

[0159] S311. When the target historical training data set is not included in the multiple historical training data sets, a reference hyperparameter is determined based on the classification identifier of the model to be trained and a preset mapping table.

[0160] The model to be trained is a model used by the training data set to be trained, and the preset mapping table includes multiple classification identifiers and hyperparameters corresponding to each classification identifier.

[0161] In some embodiments, when the target historical training data set is not included in the multiple historical training data sets, the server determines the classification identifier of the model to be trained, and determines the hyperparameter corresponding to the classification identifier of the model to be trained based on the classification identifier of the model to be trained and the preset mapping table. Further, the server determines the hyperparameter corresponding to the classification identifier of the model to be trained as the reference hyperparameter.

[0162] Exemplarily, take the model to be trained as an image classification model, and the classification identifier of the image classification model as A. Look up the hyperparameter corresponding to A in the preset mapping table, and determine the hyperparameter corresponding to A as the reference hyperparameter.

[0163] In one design, in the determination method provided by the embodiment of the present application, when the training data set is used to train the image processing model, the training data set and each historical training data set include multiple image data. The content feature is used to represent the image content of the image data.

[0164] It is understandable that the determination method provided in the embodiment of the present application can be applied to the field of image processing. The training data set and each historical training data set include multiple image data, and the hyperparameters of the image processing model are determined by the content similarity between the training image data and the historical training image data, thereby improving the accuracy of the hyperparameter search range of the image processing model.

[0165] In order to better understand the determination method provided in the embodiments of the present application, Figure 5 As shown, a flow chart of a method for determining a hyperparameter is shown, including steps S401-S407:

[0166] S401: Obtain a data set to be trained.

[0167] This step S401 refers to the above-mentioned S301 and will not be repeated here.

[0168] S402: Obtain feature data of the data set to be trained.

[0169] In some embodiments, the server obtains attribute features of the data set to be trained and overall content features of the data set to be trained.

[0170] This step S402 can refer to the above-mentioned S3061-S3062 and S308-S309, which will not be repeated here.

[0171] S403: Determine whether the target historical training data set is included in the multiple historical training data sets.

[0172] This step S403 can refer to the above-mentioned S302 and S3064, and will not be repeated here.

[0173] If yes, then execute S404. If no, then execute S405.

[0174] S404: Determine the hyperparameters of the target historical model as reference hyperparameters.

[0175] This step S404 can refer to the above-mentioned S302 and will not be repeated here.

[0176] S405: Determine reference hyperparameters based on the classification identifier of the model to be trained and the preset mapping table.

[0177] This step S405 can refer to the above-mentioned S311 and will not be repeated here.

[0178] S406: Determine a hyperparameter search range that refers to the hyperparameter attribution.

[0179] This step S406 can refer to the above-mentioned S303 and will not be described in detail here.

[0180] S407. Search for target hyperparameters within the hyperparameter search range.

[0181] This step S407 can refer to the above-mentioned S304 and will not be repeated here.

[0182] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0183] In an exemplary embodiment, the present application also provides a determination device. Figure 6 Schematic diagram of the composition of the determination device 50 provided in the embodiment of the present application. Figure 6 As shown, the determining device 50 includes: an acquiring unit 501 and a processing unit 502 .

[0184] The acquisition unit 501 is used to acquire a data set to be trained.

[0185] Processing unit 502 is used to determine the hyperparameters of the target historical model as reference hyperparameters when the target historical training data set is included in the multiple historical training data sets. The target historical training data set is a historical training data set whose similarity with the data set to be trained is greater than or equal to a preset similarity. The target historical model is a model trained according to the target historical training data set.

[0186] The processing unit 502 is further configured to determine a hyperparameter search range based on a reference hyperparameter; the hyperparameter search range includes the reference hyperparameter.

[0187] The processing unit 502 is further configured to determine a target hyperparameter corresponding to the to-be-trained data set from a hyperparameter search range based on a hyperparameter search algorithm.

[0188] In a possible implementation, the acquisition unit 501 is further configured to acquire multiple historical training data sets.

[0189] The processing unit 502 is further configured to determine a similarity between the to-be-trained data set and each of the multiple historical training data sets.

[0190] In a possible implementation, the processing unit 502 is further configured to determine the content feature of each to-be-trained data in the to-be-trained data set based on the content feature extraction model.

[0191] The processing unit 502 is further configured to determine the overall content feature of the data set to be trained according to the content feature of each data set to be trained in the data set to be trained.

[0192] The acquisition unit 501 is also used to acquire the overall content features of each historical training data set.

[0193] The processing unit 502 is further configured to determine the similarity between the dataset to be trained and each historical training dataset according to the similarity between the overall content feature of the dataset to be trained and the overall content feature of each historical training dataset.

[0194] In a possible implementation, the acquisition unit 501 is further configured to acquire the attribute features of each training data in the to-be-trained data set when the target historical training data set is not included in the multiple historical training data sets.

[0195] The processing unit 502 is further configured to determine the attribute characteristics of the data set to be trained based on the attribute characteristics of each training data.

[0196] The processing unit 502 is further used to determine preset hyperparameters according to the attribute characteristics of the data set to be trained.

[0197] In a possible implementation, when the data set to be trained is used to train an image classification model, the data set to be trained includes multiple image data. The attribute feature is used to represent the image attribute of the image data. When the data set to be trained is used to train an image detection model, the data set to be trained includes multiple image data and an image label of each image data. The attribute feature is used to represent the image attribute of the image data and the label attribute of the image label.

[0198] In one possible implementation, the processing unit 502 is also used to determine the reference hyperparameters based on the classification identifier of the model to be trained and a preset mapping table when the target historical training data set is not included in the multiple historical training data sets; the model to be trained is the model used for training with the data set to be trained, and the preset mapping table includes multiple classification identifiers and hyperparameters corresponding to each classification identifier.

[0199] In a possible implementation, the processing unit 502 is specifically configured to: determine that the product of the reference hyperparameter and the first preset coefficient is the maximum hyperparameter of the hyperparameter search range, and the first preset coefficient is greater than 1. The first preset coefficient is greater than 1. Determine that the product of the reference hyperparameter and the second preset coefficient is the minimum hyperparameter of the hyperparameter search range. The second preset coefficient is less than 1 and greater than 0. Determine the hyperparameter search range based on the maximum hyperparameter and the minimum hyperparameter.

[0200] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer-executable instructions. When the computer-executable instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer-executable instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer-executable instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a solid state disk (SSD), etc.

[0201] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the present application for which protection is sought, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the term "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple components. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0202] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0203] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for determining a hyperparameter, characterized in that: The method comprises: Get the data set to be trained; In the case where a target historical training data set is included in multiple historical training data sets, a hyperparameter of a target historical model is determined as a reference hyperparameter; the target historical training data set is a historical training data set whose similarity to the data set to be trained is greater than or equal to a preset similarity; the target historical model is a model trained according to the target historical training data set; Determine a hyperparameter search range based on the reference hyperparameter; the hyperparameter search range includes the reference hyperparameter; Based on a hyperparameter search algorithm, a target hyperparameter corresponding to the to-be-trained data set is determined from the hyperparameter search range.

2. The determination method according to claim 1, characterized in that: The method further comprises: Determining the content feature of each to-be-trained data in the to-be-trained data set based on the content feature extraction model; Determine the overall content feature of the data set to be trained according to the content feature of each data set to be trained in the data set to be trained, and obtain the overall content feature of each historical training data set in the multiple historical training data sets; The similarity between the data set to be trained and each of the historical training data sets is determined according to the similarity between the overall content feature of the data set to be trained and the overall content feature of each of the historical training data sets.

3. The determination method according to claim 1, characterized in that: The method further comprises: In a case where the target historical training data set is not included in the multiple historical training data sets, acquiring attribute features of each training data in the data set to be trained, and determining the attribute features of the data set to be trained based on the attribute features of each training data; The reference hyperparameters are determined according to the attribute characteristics of the dataset to be trained.

4. The determination method according to claim 3, characterized in that: In the case where the data set to be trained is used to train an image classification model, the data set to be trained includes a plurality of image data; the attribute feature is used to represent the image attribute of the image data; In the case where the data set to be trained is used to train an image detection model, the data set to be trained includes multiple image data and an image label for each image data; the attribute features are used to represent image attributes of the image data and label attributes of the image labels.

5. The determination method according to claim 1, characterized in that: The method further comprises: When the target historical training data set is not included in the multiple historical training data sets, the reference hyperparameters are determined based on the classification identifier of the model to be trained and a preset mapping table; the model to be trained is a model used for training the data set to be trained, and the preset mapping table includes multiple classification identifiers and hyperparameters corresponding to each classification identifier.

6. The determination method according to claim 1 or 2, characterized in that: The step of determining a hyperparameter search range based on the reference hyperparameter comprises: Determine that the product of the reference hyperparameter and a first preset coefficient is the maximum hyperparameter of the hyperparameter search range; the first preset coefficient is greater than 1; Determine that the product of the reference hyperparameter and a second preset coefficient is the minimum hyperparameter of the hyperparameter search range; the second preset coefficient is less than 1 and greater than 0; The hyperparameter search range is determined based on the maximum hyperparameter and the minimum hyperparameter.

7. A determination device, characterized in that: The determining device comprises: an acquisition unit and a processing unit; The acquisition unit is used to acquire the data set to be trained; The processing unit is used to determine the hyperparameters of the target historical model as reference hyperparameters when a target historical training data set is included in multiple historical training data sets; the target historical training data set is a historical training data set whose similarity with the data set to be trained is greater than or equal to a preset similarity; the target historical model is a model trained according to the target historical training data set; The processing unit is further configured to determine a hyperparameter search range based on the reference hyperparameter; the hyperparameter search range includes the reference hyperparameter; The processing unit is further used to determine the target hyperparameter corresponding to the to-be-trained data set from the hyperparameter search range based on a hyperparameter search algorithm.

8. The determination device according to claim 7, characterized in that: The processing unit is further used to determine the content feature of each to-be-trained data in the to-be-trained data set based on the content feature extraction model; The processing unit is further used to determine the overall content feature of the data set to be trained according to the content feature of each data set to be trained in the data set to be trained; The acquisition unit is further used to acquire the overall content features of each historical training data set; The processing unit is further used to determine the similarity between the data set to be trained and each of the historical training data sets according to the similarity between the overall content characteristics of the data set to be trained and the overall content characteristics of each of the historical training data sets; Furthermore, the acquisition unit is further used to acquire the attribute characteristics of each training data in the data set to be trained when the target historical training data set is not included in the multiple historical training data sets; the processing unit is further used to determine the attribute characteristics of the data set to be trained based on the attribute characteristics of each training data; The processing unit is further configured to determine the reference hyperparameter according to the attribute characteristics of the data set to be trained; Furthermore, in the case where the data set to be trained is used to train an image classification model, the data set to be trained includes a plurality of image data; the attribute feature is used to represent the image attribute of the image data; In the case where the data set to be trained is used to train an image detection model, the data set to be trained includes a plurality of image data and an image label of each image data; the attribute feature is used to represent the image attribute of the image data and the label attribute of the image label; And, the processing unit is further used to determine the reference hyperparameter based on the classification identifier of the model to be trained and the preset mapping table when the target historical training data set is not included in the multiple historical training data sets; The model to be trained is a model used for training the data set to be trained, and the preset mapping table includes multiple classification identifiers and hyperparameters corresponding to each classification identifier; And, the processing unit is specifically used for: Determine that the product of the reference hyperparameter and a first preset coefficient is the maximum hyperparameter of the hyperparameter search range; the first preset coefficient is greater than 1; Determine that the product of the reference hyperparameter and a second preset coefficient is the minimum hyperparameter of the hyperparameter search range; the second preset coefficient is less than 1 and greater than 0; The hyperparameter search range is determined based on the maximum hyperparameter and the minimum hyperparameter.

9. A server, characterized in that: include: Processor and memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the server implements the method for determining the hyperparameters as described in any one of claims 1-6.

10. A readable storage medium, characterized in that: The readable storage medium includes: software instructions; When the software instructions are executed in an electronic device, the electronic device implements the method for determining the hyperparameters according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Hyper-parameter determination method, related device, equipment and storage medium

    CN111260074A

  • Model training hyper-parameter optimization processing method, system and equipment and storage medium

    CN115293278A

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

    CN115577773A

  • Hyper-parameter search method and hyper-parameter search device

    CN116433994A

  • Generating new machine learning models based on combinations of historical feature-extraction rules and historical machine-learning models

    US20190362222A1