Network model training method and device, equipment and storage medium
By acquiring and enhancing sample data during the training of large-scale network models, performing feature decomposition and iterative updates, the parameter sparsity problem is solved, training efficiency is improved, and the impact of insufficient sample data is mitigated.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2022-07-06
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies suffer from parameter sparsity when training large-scale network models, resulting in low training efficiency.
By acquiring at least two sets of sample data, including original sample data and enhanced sample data, feature enhancement is performed and then input into a pre-set business model to generate reusable sample latent features. Feature decomposition is then performed, and the model is iteratively updated using a loss function corresponding to the business category.
It alleviates the parameter sparsity problem of neural networks, improves model training efficiency, reduces the impact of insufficient sample data, and does not require modification of the model structure.
Smart Images

Figure CN117454161B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and storage medium for training network models. Background Technology
[0002] As the size of neural networks increases, conventional network models exhibit parameter sparsity during training. Existing techniques typically address this issue using methods such as model structure search and model pruning. However, these techniques consume significant time in resolving parameter sparsity, resulting in low training efficiency for network models. Summary of the Invention
[0003] This invention provides a network model training method, apparatus, device, and storage medium to solve the problem of sparse model parameters while improving the training efficiency of network models.
[0004] According to one aspect of the present invention, a network model training method is provided, the method comprising:
[0005] Obtain at least two sets of sample data; wherein, the set of sample data includes original sample data and augmented sample data corresponding to the original sample data;
[0006] Feature enhancement is performed on the at least two sample data groups to obtain reused sample data;
[0007] The reused sample data is input into a pre-set business model to obtain the reused sample latent features generated by the business model during the training process based on the reused sample data;
[0008] The latent features of the reused samples are decomposed to obtain enhanced latent features;
[0009] Based on the enhanced latent features and the business category to which the business model belongs, the business model is iteratively updated using a loss function corresponding to the business category.
[0010] According to another aspect of the present invention, a network model training apparatus is provided, the apparatus comprising:
[0011] A sample data set acquisition module is used to acquire at least two sample data sets; wherein, the sample data sets include original sample data and augmented sample data corresponding to the original sample data;
[0012] A reused sample data determination module is used to perform feature enhancement on the at least two sample data groups to obtain reused sample data;
[0013] A sample latent feature generation model is used to input the reused sample data into a pre-set business model to obtain the reused sample latent features generated by the business model during the training process based on the reused sample data;
[0014] An enhanced latent feature generation module is used to perform feature decomposition on the latent features of the reused sample to obtain enhanced latent features;
[0015] The iterative update module is used to iteratively update the business model based on the enhanced potential features and the business category to which the business model belongs, and based on the loss function corresponding to the business category.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the network model training method according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the network model training method according to any embodiment of the present invention.
[0021] This application embodiment obtains at least two sets of sample data, each set including original sample data and corresponding enhanced sample data. Feature enhancement is performed on the at least two sets of sample data to obtain reused sample data. This reused sample data is then input into a pre-set business model to obtain reused sample latent features generated during training based on the reused sample data. These latent features are then decomposed to obtain enhanced latent features. Based on the enhanced latent features and the business category to which the business model belongs, the business model is iteratively updated using a loss function corresponding to the business category. This scheme, by obtaining reused sample data from multiple input sets and decomposing the latent features obtained from model training through multiple outputs, greatly alleviates the parameter sparsity problem of neural networks and reduces the impact of insufficient sample data on the network model. Furthermore, processing multiple sets of sample data to obtain corresponding reused sample data for input into the network model eliminates the need for structural modifications to the network model, thus improving training efficiency.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a network model training method provided in Embodiment 1 of the present invention;
[0025] Figure 2A This is a flowchart of a network model training method according to Embodiment 2 of the present invention;
[0026] Figure 2B This is a schematic diagram of a network model training method provided in Embodiment 2 of the present invention;
[0027] Figure 3 This is a schematic diagram of the structure of a network model training device according to Embodiment 3 of the present invention;
[0028] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the network model training method of this invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Example 1
[0032] Figure 1 This is a flowchart of a network model training method provided in Embodiment 1 of the present invention. This embodiment is applicable to the training of large-scale neural network models. The method can be executed by a network model training device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0033] S110. Obtain at least two sets of sample data; wherein the sets of sample data include the original sample data and the augmented sample data corresponding to the original sample data.
[0034] Specifically, augmented sample data can be sample data obtained by applying data augmentation strategies to the original sample data. For example, different data augmentation strategies can be used based on original sample data in different data formats. For instance, if the original sample data is in image format, the corresponding data augmentation strategy could be image geometric transformation.
[0035] Optionally, one original sample data can correspond to at least one augmented sample data, which can be related to a pre-set data augmentation strategy. For example, if three different data augmentation strategies are preset, one original sample data can be used to obtain three different augmented sample data based on the three different data augmentation strategies.
[0036] In an optional embodiment, the enhanced sample data corresponding to the original sample data is determined in the following way: the original sample data is enhanced according to at least one preset data enhancement method to obtain at least one enhanced sample data corresponding to the original sample data.
[0037] Among them, data augmentation methods can be data augmentation strategies pre-set by relevant technical personnel based on original sample data in different data formats.
[0038] For example, if relevant technical personnel pre-define three data augmentation methods according to actual needs, namely data augmentation method A, data augmentation method B, and data augmentation method C, then the original sample data will be augmented using the three data augmentation methods respectively, resulting in augmented sample data A based on data augmentation method A, augmented sample data B based on data augmentation method B, and augmented sample data C based on data augmentation method C.
[0039] In one specific embodiment, if a person skilled in the art pre-defines three data augmentation methods—data augmentation method A, data augmentation method B, and data augmentation method C—based on actual needs, and requires the acquisition of three sample data sets: a first sample data set corresponding to original sample data a, a second sample data set corresponding to original sample data b, and a third sample data set corresponding to original sample data c, then the original sample data a, original sample data b, and original sample data c are augmented accordingly using the three pre-defined data augmentation methods. This results in the first sample data set: original sample data a, augmented sample data a1, augmented sample data a2, and augmented sample data a3. Specifically, augmented sample data a1 is obtained by augmenting original sample data a using data augmentation method A; augmented sample data a2 is obtained by augmenting original sample data a using data augmentation method B; and augmented sample data a3 is obtained by augmenting original sample data a using data augmentation method C. The second sample data group consists of: original sample data b, augmented sample data b1, augmented sample data b2, and augmented sample data b3. Augmented sample data b1 is obtained by augmenting the original sample data b using data augmentation method A; augmented sample data b2 is obtained by augmenting the original sample data b using data augmentation method B; and augmented sample data b3 is obtained by augmenting the original sample data b using data augmentation method C. The third sample data group consists of: original sample data c, augmented sample data c1, augmented sample data c2, and augmented sample data c3. Augmented sample data c1 is obtained by augmenting the original sample data c using data augmentation method A; augmented sample data c2 is obtained by augmenting the original sample data c using data augmentation method B; and augmented sample data c3 is obtained by augmenting the original sample data c using data augmentation method C.
[0040] S120. Perform feature enhancement on at least two sample data groups to obtain reused sample data.
[0041] Feature processing is performed on at least two sets of sample data. Taking any one of the at least two sets of sample data as an example, the sample data of this set is input into a pre-defined first feature reuse network to obtain the reused and enhanced feature data corresponding to this set of sample data. The feature reuse network can be pre-defined by relevant technical personnel. For example, if the original sample data is in image format, the feature reuse network can be a CNN (Convolutional Neural Network). The reused and enhanced feature data can be obtained by integrating the linearly independent features corresponding to each sample data in this set.
[0042] Determine the reused and enhanced feature data corresponding to at least two sample data groups. This determination process can be performed in parallel by multiple channels to improve efficiency. Input the reused and enhanced feature data corresponding to each sample data group into a pre-defined second feature reuse network for feature enhancement. The feature reuse network performs a weighted average of the feature data generated by each reused and enhanced feature data group during the feature enhancement process to obtain the reused sample data. The second feature reuse network can be the same as or different from the first feature reuse network; it can be pre-set according to actual needs.
[0043] S130. Input the reused sample data into the pre-set business model to obtain the reused sample latent features generated by the business model during the training process based on the reused sample data.
[0044] The business model can be a pre-set neural network model to be trained based on different business needs. For example, the business model can be a network model for classification, a network model for object detection, or a network model for text analysis; this embodiment does not impose any restrictions on this.
[0045] For example, reused sample data can be input into a pre-set business model, and the business model can be trained based on the reused sample data to obtain the reused sample latent features corresponding to the reused sample data generated during the training process.
[0046] It should be noted that in existing network model training based on sample data, a training step size is usually pre-set, and a large amount of sample data is trained in batches. When the training step size is 1, it means that one sample data is input into the network model at a time, that is, the network model trains on each sample in the sample training set one by one. However, this application inputs pre-processed reused sample data one after another into the pre-set business model, which can be considered as the training step size of this solution being 1.
[0047] S140. Perform feature decomposition on the latent features of the reused samples to obtain enhanced latent features.
[0048] For example, the latent features of the reused samples can be input into a pre-defined first feature decomposition network to obtain the reused enhanced latent features corresponding to each sample data group. Each reused enhanced latent feature is then input into a pre-defined second feature decomposition network to obtain the enhanced latent features corresponding to each reused enhanced latent feature. The first and second feature decomposition networks can be the same or different, and can be pre-defined by relevant technical personnel according to actual needs. Both the first and second feature decomposition networks can be used for feature decomposition.
[0049] S150. Based on the enhanced latent features and the business category to which the business model belongs, iteratively update the business model according to the loss function corresponding to the business category.
[0050] The business category to which a business model belongs can be related to the function it performs. For example, a business model used for classification might belong to the category of classification tasks.
[0051] The loss function corresponding to the business category can be pre-set by relevant technical personnel before training the business model.
[0052] In an optional embodiment, if the business category is a classification task, then the loss function corresponding to the business category is a summation function of contrast loss, classification loss, and consistency loss.
[0053] If the business category is a classification task, the loss function corresponding to the business category can be either a loss function obtained by directly summing the contrastive loss, classification loss, and consistency loss, or a loss function obtained by weighted summation. The loss functions corresponding to the contrastive loss, classification loss, and consistency loss can be preset by relevant technical personnel; for example, the classification loss can be the cross-entropy loss function. This embodiment does not impose any restrictions on this.
[0054] For example, based on the business category to which the business model belongs, enhanced latent features can be fed into different task heads to obtain the predicted data output by the task head. Based on the predicted data and a preset loss function, backpropagation can be performed on the business model to achieve iterative updates. Here, the task head can be the desired output data; for example, for a classification model, the task head can be the classification category or classification probability value.
[0055] This application embodiment obtains at least two sets of sample data, each set including original sample data and corresponding enhanced sample data. Feature enhancement is performed on the at least two sets of sample data to obtain reused sample data. This reused sample data is then input into a pre-set business model to obtain reused sample latent features generated during training based on the reused sample data. These latent features are then decomposed to obtain enhanced latent features. Based on the enhanced latent features and the business category to which the business model belongs, the business model is iteratively updated using a loss function corresponding to the business category. This scheme, by obtaining reused sample data from multiple input sets and decomposing the latent features obtained from model training through multiple outputs, greatly alleviates the parameter sparsity problem of neural networks and reduces the impact of insufficient sample data on the network model. Furthermore, processing multiple sets of sample data to obtain corresponding reused sample data for input into the network model eliminates the need for structural modifications to the network model, thus improving training efficiency.
[0056] Example 2
[0057] Figure 2A This is a flowchart of a network model training method provided in Embodiment 2 of the present invention. This embodiment is an optimization and improvement based on the above technical solutions.
[0058] Furthermore, the step "perform feature enhancement on at least two sample data groups to obtain reused sample data" is refined to "perform feature enhancement on at least two sample data groups respectively to obtain reused enhanced feature data corresponding to each sample data group; perform feature enhancement on each reused enhanced feature data to obtain the reused sample data." This improves the method for determining reused sample data.
[0059] Furthermore, the step "decompose the latent features of the reused sample to obtain enhanced latent features" is refined to "decompose the latent features of the reused sample to obtain reused enhanced latent features; decompose the reused enhanced latent features to obtain enhanced latent features." This improves the method for determining enhanced latent features.
[0060] like Figure 2A As shown, the method includes the following specific steps:
[0061] S210. Obtain at least two sample data sets; wherein the sample data sets include original sample data and augmented sample data corresponding to the original sample data.
[0062] S220. Perform feature enhancement on at least two sample data groups respectively to obtain the reused enhanced feature data corresponding to each sample data group.
[0063] When performing feature enhancement on sample data within each sample data group, location information can be encoded for the data in the sample data group to facilitate subsequent feature mapping for each sample data.
[0064] In one optional embodiment, feature enhancement is performed on at least two sample data groups to obtain reused enhanced feature data corresponding to each sample data group, including: encoding position information on at least two sample data groups to obtain encoded sample data corresponding to each sample data group; and performing feature enhancement on each encoded sample data to obtain reused enhanced feature data.
[0065] One method for encoding the location information of each sample in the sample data group is, for example, one-hot encoding.
[0066] The following explanation uses any one of at least two sample data sets as an example. The positional information of the sample data within this set is encoded. The sample data in this set includes original sample data and augmented original data. The resulting encoded sample data set includes encoded sample data, which consists of both the original sample data and the augmented sample data after positional information encoding.
[0067] The encoded sample data set is input into a preset first feature multiplexing network. This first feature multiplexing network obtains the mapped feature data for each encoded sample data based on the encoded sample data in the encoded sample data set. For example, the encoded sample data in the encoded sample data set is {x1, x2, ..., x...}. n}, then the mapped feature data is The obtained mapped feature data has linearly independent features. The mapped feature data is then superimposed to obtain the reused and enhanced feature data corresponding to the sample data set. For example, the superposition method can be direct addition, weighted addition, or weighted summation followed by averaging; the specific method can be set according to actual needs, and this embodiment does not impose any restrictions. The first feature reuse network can be specifically set according to actual needs. For example, if the sample data set is in image format, the corresponding first feature reuse network can be a CNN network.
[0068] For example, if the sample data in the encoded sample data group input to the feature reuse network consists of 1*n-dimensional encoded original sample data a, 1*n-dimensional encoded enhanced sample data b, and 1*n-dimensional encoded enhanced sample data c, then after inputting the original sample data a, enhanced sample data b, and enhanced sample data c into the first feature reuse network, the first feature reuse network processes the input sample data to obtain feature vector a corresponding to the original sample data a, feature vector b corresponding to the enhanced sample data b, and feature vector c corresponding to the enhanced sample data c, respectively. Furthermore, feature vectors a, b, and c are linearly independent. The feature vectors a, b, and c are then superimposed, and the result is used as the reused enhanced feature data corresponding to the sample data group.
[0069] S230. Perform feature enhancement on each reused enhanced feature data to obtain reused sample data.
[0070] For example, after obtaining the reused enhanced feature data corresponding to at least two sample data groups, the reused enhanced feature data is enhanced to obtain reused sample data.
[0071] When performing feature enhancement on each multiplexed enhanced feature data, location information can be encoded for each multiplexed enhanced feature data to facilitate subsequent feature mapping.
[0072] In one optional embodiment, feature enhancement is performed on each multiplexed enhanced feature data to obtain multiplexed sample data, including: encoding the location information of each multiplexed enhanced feature data to obtain coded feature data corresponding to each sample data group; and performing feature enhancement on each coded feature data to obtain multiplexed sample data.
[0073] One example of encoding the location information of each reused enhanced feature data is using one-hot encoding.
[0074] For example, location information is encoded into each multiplexed enhanced feature data to obtain coded feature data corresponding to each multiplexed enhanced feature data. Each coded feature data is input into the second feature multiplexing network in tuple form to obtain the feature data mapped from each coded feature data. Based on a certain weight distribution, the mapped feature data from each coded feature data are weighted, summed, and averaged to obtain the final multiplexed sample data. The second feature multiplexing network can be the same as or different from the first feature multiplexing network; the specific design can be determined by relevant technical personnel according to actual needs.
[0075] S240. Input the reused sample data into the pre-set business model to obtain the reused sample latent features generated by the business model during the training process based on the reused sample data.
[0076] S250. Perform feature decomposition on the latent features of the reused samples to obtain the reused enhanced latent features.
[0077] For example, the latent features of the reused samples are input into the first feature decomposition network, and the first feature decomposition network performs feature mapping on the latent features of the reused samples to obtain the reused enhanced latent features corresponding to each sample data group.
[0078] S260. Perform feature decomposition on the reused enhancement latent features to obtain the enhancement latent features.
[0079] For example, the reused enhanced latent features are input into the second feature decomposition network, and the second feature decomposition network performs feature mapping on the reused enhanced latent features corresponding to each sample data group to obtain the enhanced latent features corresponding to each sample position in the sample data group.
[0080] S270. Based on the enhanced latent features and the business category to which the business model belongs, iteratively update the business model according to the loss function corresponding to the business category.
[0081] This embodiment achieves accurate determination of reused sample data and enhanced latent features by performing feature enhancement on at least two sample data groups respectively, obtaining reused enhanced feature data for each sample data group; further feature enhancement is performed on each reused enhanced feature data to obtain reused sample data; feature decomposition is performed on the latent features of the reused sample data to obtain reused enhanced latent features; and feature decomposition is performed on the reused enhanced latent features to obtain enhanced latent features. This solves the parameter sparsity problem in large-scale neural network training while mitigating the impact of insufficient sample data on the network model. No structural modifications to the network model are required, thus improving the efficiency of model training.
[0082] In one specific implementation, such as Figure 2B The diagram shows a method for training a network model.
[0083] Multiple sample data sets are collected from the original dataset and used for multi-channel input and parallel processing. Each sample data set includes the original sample data and augmented data after data augmentation based on different data augmentation strategies. This implementation employs three data augmentation strategies to augment the original sample data. For each input, the sample data set in that channel is augmented and reused. Specifically, this can be done by encoding the location information of the sample data set and then performing feature augmentation to obtain the reused augmented feature data corresponding to that sample data set. The reused augmented feature data from each output is then reused to obtain reused sample data. Specifically, this can be done by encoding the location of the reused augmented feature data corresponding to each channel and then performing feature augmentation. The obtained reused sample data is input into the main part of the business model for model training, resulting in the reused sample latent features output by the business model. The reused sample latent features are decomposed to obtain reused augmented latent features corresponding to each of the multiple inputs, forming multiple outputs. For each output, the decomposed reused augmented latent features are further decomposed to obtain the augmented latent features corresponding to each sample data set. The enhanced latent features are input into the task-related task header to obtain the model's predicted values. Based on the model's predicted values and a pre-defined loss function, the business model is updated through backpropagation. The task header can be pre-defined by relevant technical personnel based on different actual needs; for example, it could be a classification task or a probability value determination task.
[0084] Example 3
[0085] Figure 3 This is a schematic diagram of a network model training device provided in Embodiment 3 of the present invention. The network model training device provided in this embodiment is applicable to training large-scale neural network models. This network model training device can be implemented in hardware and / or software, such as... Figure 3 As shown, the device specifically includes: a sample data set acquisition module 301, a reused sample data determination module 302, a sample latent feature generation model 303, an enhanced latent feature generation module 304, and an iterative update module 305. Among them,
[0086] The sample data set acquisition module 301 is used to acquire at least two sample data sets; wherein, the sample data set includes original sample data and augmented sample data corresponding to the original sample data;
[0087] The reused sample data determination module 302 is used to perform feature enhancement on the at least two sample data groups to obtain reused sample data;
[0088] The sample latent feature generation model 303 is used to input the reused sample data into a pre-set business model to obtain the reused sample latent features generated by the business model based on the reused sample data during the training process;
[0089] The enhanced latent feature generation module 304 is used to perform feature decomposition on the latent features of the reused sample to obtain enhanced latent features;
[0090] The iterative update module 305 is used to iteratively update the business model based on the enhanced potential features and the business category to which the business model belongs, and based on the loss function corresponding to the business category.
[0091] This application embodiment obtains at least two sets of sample data, each set including original sample data and corresponding enhanced sample data. Feature enhancement is performed on the at least two sets of sample data to obtain reused sample data. This reused sample data is then input into a pre-set business model to obtain reused sample latent features generated during training based on the reused sample data. These latent features are then decomposed to obtain enhanced latent features. Based on the enhanced latent features and the business category to which the business model belongs, the business model is iteratively updated using a loss function corresponding to the business category. This scheme, by obtaining reused sample data from multiple input sets and decomposing the latent features obtained from model training through multiple outputs, greatly alleviates the parameter sparsity problem of neural networks and reduces the impact of insufficient sample data on the network model. Furthermore, processing multiple sets of sample data to obtain corresponding reused sample data for input into the network model eliminates the need for structural modifications to the network model, thus improving training efficiency.
[0092] Optionally, the reused sample data determination module 302 includes:
[0093] A reused enhanced feature data determination unit is used to perform feature enhancement on the at least two sample data groups respectively to obtain reused enhanced feature data corresponding to each sample data group;
[0094] The reused sample data determination unit is used to perform feature enhancement on each of the reused enhanced feature data to obtain the reused sample data.
[0095] Optionally, the multiplexing enhanced feature data determination unit includes:
[0096] The encoded sample data determination subunit is used to encode the location information of at least two sample data groups respectively to obtain the encoded sample data corresponding to each sample data group;
[0097] A reused enhanced feature data determination subunit is used to perform feature enhancement on each of the coded sample data to obtain the reused enhanced feature data.
[0098] Optionally, the reused sample data determination unit includes:
[0099] The encoding feature data determination subunit is used to encode the location information of each of the multiplexed enhanced feature data to obtain the encoding feature data corresponding to each sample data group;
[0100] The reused sample data determination subunit is used to perform feature enhancement on each of the coded feature data to obtain the reused sample data.
[0101] Optionally, the augmented sample data corresponding to the original sample data is determined in the following way:
[0102] The original sample data is augmented according to at least one preset data augmentation method to obtain at least one augmented sample data corresponding to the original sample data.
[0103] Optionally, the enhanced latent feature generation module 304 includes:
[0104] A reuse-enhanced latent feature determination unit is used to perform feature decomposition on the reused sample latent features to obtain reuse-enhanced latent features;
[0105] An enhanced latent feature generation unit is used to perform feature decomposition on the reused enhanced latent features to obtain enhanced latent features.
[0106] Optionally, if the business category is a classification task, then the loss function corresponding to the business category is a summation function of contrast loss, classification loss, and consistency loss.
[0107] The network model training device provided in this embodiment of the invention can execute the network model training method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0108] Example 4
[0109] Figure 4A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0110] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0111] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0112] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as network model training methods.
[0113] In some embodiments, the network model training method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the network model training method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the network model training method by any other suitable means (e.g., by means of firmware).
[0114] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0116] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0117] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0118] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0119] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0120] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0121] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for training an image network model, characterized in that, include: Obtain at least two sample data sets; wherein the sample data sets include original sample data and augmented sample data corresponding to the original sample data; wherein the original sample data is in image format; Feature enhancement is performed on the at least two sample data groups to obtain reused sample data; The reused sample data is input into a pre-set business model to obtain the reused sample latent features generated by the business model during the training process based on the reused sample data; The latent features of the reused samples are decomposed to obtain enhanced latent features; Based on the enhanced latent features and the business category to which the business model belongs, the business model is iteratively updated according to the loss function corresponding to the business category; The step of performing feature enhancement on the at least two sample data groups to obtain reused sample data includes: Feature enhancement is performed on each of the at least two sample data groups to obtain reused enhanced feature data corresponding to each sample data group; The reused enhanced feature data is enhanced to obtain the reused sample data; The step of performing feature enhancement on the at least two sample data groups to obtain reused enhanced feature data corresponding to each sample data group includes: At least two sample data groups are respectively encoded with location information to obtain the encoded sample data corresponding to each sample data group; The coded sample data is enhanced with features to obtain the reused enhanced feature data. The location information of each sample in the sample data group is encoded using one-hot encoding.
2. The method according to claim 1, characterized in that, The reused enhanced feature data is enhanced to obtain the reused sample data, including: The location information of each of the multiplexed enhanced feature data is encoded to obtain the encoded feature data corresponding to each sample data group; Feature enhancement is performed on each of the encoded feature data to obtain the reused sample data.
3. The method according to claim 1, characterized in that, The augmented sample data corresponding to the original sample data is determined in the following way: The original sample data is augmented according to at least one preset data augmentation method to obtain at least one augmented sample data corresponding to the original sample data.
4. The method according to any one of claims 1-3, characterized in that, The step of performing feature decomposition on the latent features of the reused samples to obtain enhanced latent features includes: The latent features of the reused samples are decomposed to obtain the reused enhanced latent features; The reused enhancement latent features are decomposed to obtain the enhancement latent features.
5. The method according to any one of claims 1-3, characterized in that, If the business category is a classification task, then the loss function corresponding to the business category is a summation function of contrast loss, classification loss, and consistency loss.
6. A training device for an image network model, characterized in that, include: A sample data set acquisition module is used to acquire at least two sample data sets; wherein, the sample data set includes original sample data and augmented sample data corresponding to the original sample data; wherein, the original sample data is in image format; A reused sample data determination module is used to perform feature enhancement on the at least two sample data groups to obtain reused sample data; A sample latent feature generation model is used to input the reused sample data into a pre-set business model to obtain the reused sample latent features generated by the business model during the training process based on the reused sample data; An enhanced latent feature generation module is used to perform feature decomposition on the latent features of the reused sample to obtain enhanced latent features; The iterative update module is used to iteratively update the business model based on the enhanced potential features and the business category to which the business model belongs, and based on the loss function corresponding to the business category. The reused sample data determination module includes: A reused enhanced feature data determination unit is used to perform feature enhancement on the at least two sample data groups respectively to obtain reused enhanced feature data corresponding to each sample data group; A reused sample data determination unit is used to perform feature enhancement on each of the reused enhanced feature data to obtain the reused sample data; The reused enhanced feature data determination unit includes: The encoded sample data determination subunit is used to encode the location information of at least two sample data groups respectively to obtain the encoded sample data corresponding to each sample data group; A reused enhanced feature data determination subunit is used to perform feature enhancement on each of the coded sample data to obtain the reused enhanced feature data; The location information of each sample in the sample data group is encoded using one-hot encoding.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the image network model training method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image network model training method according to any one of claims 1-5.