Training method, medium, device and computing equipment of small sample continual learning model

By introducing slow and fast weight mechanisms into the few-shot continuous learning model, and using active markers to calculate mapping values ​​to update fast weights, the balance between few-shot learning and continuous learning is solved, improving the model's task sequence processing performance and training effect.

CN112734038BActive Publication Date: 2026-01-13TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110077164.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-20
Publication Date
2026-01-13
Estimated Expiration
2041-01-20

AI Technical Summary

Technical Problem

Existing technologies struggle to simultaneously achieve generalization and fitting capabilities in both few-shot learning and continuous learning, leading to reduced learning capacity and impacting the processing performance of task sequences.

Method used

By introducing slow and fast weight mechanisms into the few-shot continuous learning model, the mapping value is calculated using the activity labels of the current task and historical tasks, the fast weight is updated through the classification loss function, and the slow weight is combined for model training, thus balancing the needs of few-shot learning and continuous learning.

Benefits of technology

It improves the performance of the few-shot continuous learning model in processing the entire task sequence, ensures the model's generalization and fitting ability, prevents catastrophic forgetting, and improves training results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112734038B_ABST
    Figure CN112734038B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a training method, medium, device and computing equipment of a small sample continual learning model. The method comprises: the small sample continual learning model comprises slow weights and fast weights, based on a training data set corresponding to a current task, a current activity label corresponding to the slow weights is calculated; based on the current activity label and a cumulative activity label stored by a previous task, a mapping value is calculated; the slow weights are copied to the fast weights, and the fast weights are updated through a classification loss function; the parameters in the slow weights are updated through the updated fast weights, and based on the updated fast weights and the slow weights, the training of the small sample continual learning model is realized. The present application can balance the generalization ability of small sample learning and the fitting ability of continual learning in the same model, and improve the processing performance of the small sample continual learning model on the entire task sequence.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of artificial intelligence, and more particularly, to a training method of a small sample continual learning model, a medium, an apparatus and a computing device. BACKGROUND

[0002] This section is intended to provide background information to facilitate an understanding of embodiments of the application as set forth in the claims. The description herein does not constitute admission of prior art.

[0003] Small sample learning and continual learning are two important tasks in the fields of science and engineering. The goal of small sample learning is to learn a new task from a small number of training samples, and the goal of continual learning is to avoid catastrophic forgetting of learned old tasks when learning new tasks, thereby improving the ability to learn incremental tasks.

[0004] However, in practice, it is found that continual learning attempts to accurately remember input tasks to reduce catastrophic forgetting, which inevitably overfits the seen tasks and interferes with the generalization ability required for small sample learning, often resulting in reduced learning ability for small sample learning. It can be seen that the goals of small sample learning and continual learning are difficult to achieve simultaneously, and simultaneous achievement of the goals of small sample learning and continual learning can affect the processing performance of the entire task sequence. SUMMARY

[0005] In this context, embodiments of the present application aim to provide a training method of a small sample continual learning model, the small sample continual learning model comprising slow weights and fast weights, the method comprising:

[0006] calculating a current activity label corresponding to the slow weights based on a training data set corresponding to a current task;

[0007] calculating a mapping value based on the current activity label and a cumulative activity label stored by a previous task, the mapping value being used to constrain updating of the fast weights;

[0008] copying the slow weights to the fast weights, and updating the fast weights by a classification loss function;

[0009] updating parameters in the slow weights by the updated fast weights, and realizing training of the small sample continual learning model based on the updated fast weights and the slow weights.

[0010] In one embodiment of the present application, before calculating a current activity label corresponding to the slow weights based on a training data set corresponding to a current task, the method further comprises:

[0011] obtaining a preset support dataset;

[0012] pre-training based on the support dataset to obtain slow weights.

[0013] In one embodiment of the present embodiment, the small sample continual learning model comprises a feature embedding layer and an output layer, the slow weights are composed of parameters in the feature embedding layer and parameters in the output layer, and the fast weights are composed of parameters in the feature embedding layer and parameters in the output layer.

[0014] In one embodiment of the present embodiment, based on a training dataset corresponding to a current task, a current activity label corresponding to the slow weights is calculated, comprising:

[0015] obtaining a training dataset corresponding to a current task;

[0016] calculating the training dataset to obtain a module length of each parameter gradient expectation in each layer of a feature embedding layer of the slow weights;

[0017] determining the module length as the current activity label corresponding to the slow weights.

[0018] In one embodiment of the present embodiment, based on the current activity label and a cumulative activity label stored by a previous task, a mapping value is calculated, comprising:

[0019] obtaining a cumulative activity label corresponding to a historical task stored in advance;

[0020] updating the cumulative activity label through the current activity label;

[0021] calculating a difference between a mean value of the updated cumulative activity label and the current activity label;

[0022] mapping the difference between the mean values through a Sigmoid function to obtain a mapping value.

[0023] In one embodiment of the present embodiment, the slow weights are copied to the fast weights, and the fast weights are updated through a classification loss function, comprising:

[0024] obtaining a historical training dataset corresponding to a historical task;

[0025] adding the historical training dataset to a training dataset corresponding to the current task to obtain a replay dataset;

[0026] copying the slow weights to the fast weights;

[0027] Based on the replay dataset, the slow weights, and the mapping values, the fast weights are updated using a classification loss function, which is the loss function in the few-shot continuous learning model.

[0028] In one embodiment of this implementation, after updating the parameters in the slow weights using the updated fast weights, and training the few-shot continuous learning model based on the updated fast weights and the slow weights, the method further includes:

[0029] When it is detected that there is a corresponding next task for the current task, the next task is determined as the current task, and the process of obtaining the training dataset corresponding to the current task is executed.

[0030] When it is detected that there is no corresponding next task for the current task, it is determined that the training of the few-shot continuous learning model is complete, and the performance of the few-shot continuous learning model is verified by the verification dataset corresponding to each task, so as to obtain the performance verification result of the few-shot continuous learning model.

[0031] In a second aspect of the present invention, a training apparatus for a few-shot continuous learning model is provided, the few-shot continuous learning model including slow weights and fast weights, the apparatus comprising:

[0032] The first computing unit is used to calculate the current activity tag corresponding to the slow weight based on the training dataset corresponding to the current task;

[0033] The second calculation unit is used to calculate a mapping value based on the current activity tag and the cumulative activity tags stored by the prior tasks, and the mapping value is used to constrain the update of the fast weight;

[0034] The copying unit is used to copy the slow weights to the fast weights and update the fast weights using a classification loss function;

[0035] The update unit is used to update the parameters in the slow weights using the updated fast weights, and to train the few-sample continuous learning model based on the updated fast weights and the slow weights.

[0036] In one embodiment of this implementation, the apparatus further includes:

[0037] The acquisition unit is used to acquire a pre-set support dataset before the first calculation unit calculates the current activity tag corresponding to the slow weight based on the training dataset corresponding to the current task;

[0038] The training unit is used to pre-train based on the supporting dataset to obtain slow weights.

[0039] In one embodiment of this implementation, the few-shot continuous learning model includes a feature embedding layer and an output layer. The slow weights are composed of parameters in the feature embedding layer and parameters in the output layer, and the fast weights are composed of parameters in the feature embedding layer and parameters in the output layer.

[0040] In one embodiment of this implementation, the first computing unit includes:

[0041] The first acquisition subunit is used to acquire the training dataset corresponding to the current task;

[0042] The first computational subunit is used to compute the training dataset to obtain the magnitude of the expected gradient of each parameter in each layer of the slow-weight feature embedding layer.

[0043] A subunit is determined to identify the current active flag corresponding to the slow weight, with the modulus being the same as the current active flag.

[0044] In one embodiment of this implementation, the second computing unit includes:

[0045] The second acquisition subunit is used to acquire the cumulative activity flags corresponding to previously stored historical tasks;

[0046] The first update subunit is used to update the cumulative activity marker using the current activity marker;

[0047] The second calculation subunit is used to calculate the difference between the updated cumulative activity marker and the mean of the current activity marker;

[0048] The mapping subunit is used to map the difference of the mean using the Sigmoid function to obtain the mapped value.

[0049] In one embodiment of this implementation, the replication unit includes:

[0050] The third acquisition subunit is used to acquire the historical training dataset corresponding to the historical task.

[0051] Add a sub-unit to add the historical training dataset to the training dataset corresponding to the current task to obtain the replay dataset;

[0052] A copying subunit is used to copy the slow weight to the fast weight;

[0053] The second update subunit is used to update the fast weights based on the replay dataset, the slow weights, and the mapping value, using a classification loss function, where the classification loss function is the loss function in the few-shot continuous learning model.

[0054] In one embodiment of this implementation, the apparatus further includes:

[0055] The determining unit is configured to, after the updating unit updates the parameters in the slow weights with the updated fast weights and trains the few-shot continuous learning model based on the updated fast weights and the slow weights, and when it is detected that there is a corresponding next task for the current task, determine the next task as the current task and control the first obtaining subunit to obtain the training dataset corresponding to the current task.

[0056] The verification unit is used to determine that the few-shot continuous learning model has been trained when it is detected that there is no corresponding next task for the current task, and to verify the performance of the few-shot continuous learning model through the verification datasets corresponding to each task, so as to obtain the performance verification result of the few-shot continuous learning model.

[0057] In a third aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing a computer program that, when executed by a processor, can implement the method described in any one of the first aspects.

[0058] In a fourth aspect of the present invention, a computing device is provided, including the storage medium described in the third aspect.

[0059] The training method, medium, apparatus, and computing device for a few-shot continuous learning model according to embodiments of the present invention can set slow weights and fast weights in the few-shot continuous learning model, and can calculate the mapping value used to constrain the fast weights through the activity markers associated with the slow weights. The fast weights are updated through the mapping value and the slow weights, and the fast weights are updated again through the updated slow weights, so as to realize the training of the few-shot continuous model. This balances the generalization ability of few-shot learning and the fitting ability of continuous learning in the same model, and improves the processing performance of the few-shot continuous learning model for the entire task sequence. Attached Figure Description

[0060] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:

[0061] Figure 1 This is a flowchart illustrating a training method for a few-shot continuous learning model provided in an embodiment of the present invention.

[0062] Figure 2a These are example images included in the miniImageNet dataset;

[0063] Figure 2b Example images for the omniglot dataset;

[0064] Figure 3 A flowchart illustrating a training method for a few-shot continuous learning model provided in another embodiment of the present invention;

[0065] Figure 4 This is a schematic diagram of the structure of a training device for a few-shot continuous learning model provided in an embodiment of the present invention;

[0066] Figure 5 A schematic diagram of the structure of a medium according to an embodiment of the present invention is shown.

[0067] Figure 6 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown.

[0068] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0069] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0070] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0071] According to embodiments of the present invention, a training method, medium, apparatus, and computing device for a few-shot continuous learning model are proposed.

[0072] In this article, it is important to understand that any number of elements in the accompanying figures is for illustrative purposes and not for limitation, and any naming is for distinction only and has no limiting meaning.

[0073] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.

[0074] Exemplary method

[0075] The following is for reference. Figure 1 , Figure 1This is a flowchart illustrating a training method for a few-shot continuous learning model according to an embodiment of the present invention. It should be noted that the embodiments of the present invention can be applied to any applicable scenario.

[0076] Figure 1 The flowchart 100 of the training method for a few-shot continuous learning model provided in an embodiment of the present invention, shown below, includes:

[0077] Step S101: Based on the training dataset corresponding to the current task, calculate the current activity label corresponding to the slow weight; the few-shot continuous learning model includes slow weights and fast weights;

[0078] Step S102: Based on the current activity tag and the cumulative activity tag stored by the prior tasks, a mapping value is calculated, and the mapping value is used to constrain the update of the fast weight;

[0079] Step S103: Copy the slow weights to the fast weights, and update the fast weights using the classification loss function;

[0080] Step S104: Update the parameters in the slow weights using the updated fast weights, and train the few-sample continuous learning model based on the updated fast weights and slow weights.

[0081] The model processing method proposed in this application targets a few-shot continuous learning model built on artificial intelligence, represented by artificial neural networks. This model is used to learn new tasks with a small number of samples and learn incremental tasks without forgetting previously learned tasks.

[0082] This invention enables the setting of slow and fast weights in a few-shot continuous learning model. A mapping value for constraining the fast weights can be calculated using activity markers associated with the slow weights. The fast weights are then updated using this mapping value and the slow weights, and the fast weights are updated again using the updated slow weights. This achieves the training of the few-shot continuous model, balancing the generalization ability of few-shot learning and the fitting ability of continuous learning within the same model, thereby improving the performance of the few-shot continuous learning model in processing the entire task sequence.

[0083] The following diagram illustrates how to balance the generalization ability of few-shot learning and the fitting ability of continuous learning within the same model, thereby improving the performance of few-shot continuous learning models in processing the entire task sequence:

[0084] In this embodiment of the invention, the few-shot continuous learning model includes a feature embedding layer and an output layer. The slow weights are composed of parameters from the feature embedding layer and the output layer, and the fast weights are composed of parameters from the feature embedding layer and the output layer. Therefore, the slow and fast weights can be obtained from the parameters in the feature embedding layer and the output layer of the few-shot continuous learning model, ensuring the correlation between the few-shot continuous learning model and the slow and fast weights.

[0085] In this embodiment of the invention, in order to achieve the goal of simultaneously realizing few-shot learning and continuous learning in the same model, the few-shot continuous learning model can be trained by a task sequence consisting of multiple tasks. Each task can be a different task, and each task can correspond to a training dataset with a small number of samples. The current task can be any task in the task sequence, and the training dataset can contain a small number of training samples. Since slow weights assist in realizing few-shot learning, the current activity label corresponding to the slow weights can be obtained by training on the training dataset corresponding to the current task.

[0086] Furthermore, it is possible to obtain the cumulative activity tags stored in previous tasks before the current task, and to calculate a mapping value based on the cumulative activity tags and the current activity tag. This mapping value can restrict the update of fast weights and prevent overfitting of the model during continuous learning with few samples.

[0087] In this embodiment of the invention, slow weights can be copied to fast weights, and fast weights can be updated based on slow weights and mapping values ​​using a classification loss function. This allows the updated fast weights to be used as a basis when learning new tasks. The classification loss function can be the loss function in a few-shot continuous learning model. The loss function of a few-shot continuous learning model can be used to calculate the gradient by combining the calculated loss result with the mapping value, thereby updating the parameters of the fast weights.

[0088] Furthermore, the slow weights can be updated again using the updated fast weights to improve the generalization ability of the few-shot continuous learning model for subsequent tasks and training samples. Based on the updated parameters of the slow weights and the fast weights, the few-shot continuous learning model can be trained.

[0089] As an optional implementation, step S101, which calculates the current activity tag corresponding to the slow weight based on the training dataset corresponding to the current task, may specifically include the following steps:

[0090] Get the training dataset corresponding to the current task;

[0091] The training dataset is used to calculate the magnitude of the expected gradient of each parameter in each layer of the slow-weight feature embedding layer.

[0092] The modulus is determined to be the current active flag corresponding to the slow weight.

[0093] This implementation method allows for the calculation of the current activity label corresponding to the slow weight by calculating the training dataset corresponding to the current task, thereby improving the accuracy of calculating the current activity label.

[0094] In this embodiment of the invention, the current task can be t, the training dataset corresponding to the current task t can be Dt, and the slow weights included in the few-shot continuous learning model can be θ. s The fast weight can be θ f In a few-shot continuous learning model, the feature input layer can be e, the output layer can be o, and the slow weights θ consist of the parameters in the feature embedding layer e and the parameters in the output layer o. s It can be Furthermore, the fast weights θ, composed of the parameters in the feature embedding layer e and the parameters in the output layer o, are... f It can be

[0095] Furthermore, each layer of the slow-weighted feature embedding layer can be represented as l, and each parameter in each layer can be represented as i. This can be determined by analyzing the training dataset D. t The calculation yields the magnitude of the expected gradient of each parameter in each layer of the slow-weight feature embedding layer. This magnitude can be used to determine the current active flag corresponding to the slow weight. The expression for the current activity tag is:

[0096]

[0097] As an optional implementation, step S102, which calculates the mapping value based on the current activity marker and the accumulated activity markers stored by prior tasks, may specifically include the following steps:

[0098] Retrieve the cumulative activity flags corresponding to previously stored historical tasks;

[0099] Update the cumulative activity marker using the current activity marker;

[0100] The difference between the updated cumulative activity marker and the mean of the current activity marker is calculated.

[0101] The difference between the means is mapped using the Sigmoid function to obtain the mapped value.

[0102] In this implementation, the cumulative activity markers corresponding to historical tasks can be updated using the current activity markers, and a mapping value can be calculated using the current activity markers and the cumulative activity markers to make the obtained mapping value more accurate.

[0103] In this embodiment of the invention, the accumulated activity markers corresponding to previously stored historical tasks can be obtained. The cumulative activity flag can be updated based on the current activity flag in an accumulative manner, i.e. Furthermore, the difference between the mean of the cumulative activity tag and the current activity tag can be calculated by comparing the updated cumulative activity tag and the current activity tag. The difference can then be mapped to the (0, 1) interval using the Sigmoid function to obtain the mapped value. The expression for this mapping value can be:

[0104]

[0105] Where m can be a positive scale hyperparameter, and N l This can be the number of parameters in the first layer.

[0106] In this embodiment of the invention, in order to achieve both few-shot learning and continuous learning within the same model, a fast and slow weight mechanism and a two-step consolidation mechanism can be set for the few-shot continuous learning model. The fast and slow weight mechanism is as follows: slow weights can assist in few-shot learning, while fast weights can assist in continuous learning. The two-step consolidation mechanism is as follows: the change of fast weights in the feature input layer can be limited by the expected gradient accumulation size to reduce overfitting, and a mapping value can be calculated by the Sigmoid function to limit the fast weights, thereby avoiding underfitting.

[0107] For example, a few-shot continuous learning model can be an image classification model for image classification. Based on its few-shot learning and continuous learning capabilities, this model can classify images of various categories, improving its classification performance. The training dataset for the task can contain training data of image samples. This training dataset allows the few-shot continuous learning model to continuously learn its ability to classify different types of images. Please refer to [further details omitted]. Figure 2a and Figure 2b , Figure 2a These are sample images included in the miniImageNet dataset. Figure 2bUsing example images from the Omniglot dataset, the few-shot continuous learning model can be trained in the manner described above. This allows the model to learn 10 classification tasks, each involving 5 image classes, with 5 training images per class. After training, the few-shot continuous learning model can classify the 50 learned image classes. For example, in... Figure 2a On the miniImageNet dataset shown and in Figure 2b On the Omniglot dataset shown, the few-shot continuous learning model can improve the classification accuracy of continuous learning from 18.07% and 92.13% to 33.66% and 96.63%, respectively.

[0108] It is evident that the ability to continuously learn new tasks and samples is crucial for few-shot continuous learning models. For image classification tasks, it is often necessary to continuously learn new categories, such as when a face recognition system needs to register new users. Image classification tasks trained by few-shot continuous learning models often require a large amount of labeled data for training, which is often difficult to obtain in real-world applications (such as face recognition of a single user or fingerprint locks). Therefore, it is necessary to consider continuous learning in scenarios with limited samples, i.e., few-shot continuous learning.

[0109] Please see Figure 3 , Figure 3 This is a flowchart illustrating a training method for a few-shot continuous learning model according to another embodiment of the present invention. Figure 3 The flowchart 300 of the training method for a few-shot continuous learning model provided in another embodiment of the present invention includes:

[0110] Step S301: Obtain the pre-set support dataset;

[0111] Step S302: Pre-training is performed based on the support dataset to obtain slow weights.

[0112] In this embodiment of the invention, by implementing steps S301 to S302, the slow weights can be pre-trained using a pre-set support training set before the few-shot continuous learning model learns the task, so as to obtain the initial slow weights and ensure that the few-shot continuous learning model can learn normally based on the slow weights.

[0113] Step S303: Based on the training dataset corresponding to the current task, calculate the current activity tag corresponding to the slow weight;

[0114] Step S304: Based on the current activity tag and the cumulative activity tag stored by the prior tasks, calculate the mapping value, which is used to constrain the update of the fast weight;

[0115] Step S305: Obtain the historical training dataset corresponding to the historical task;

[0116] Step S306: Add the historical training dataset to the training dataset corresponding to the current task to obtain the replay dataset;

[0117] Step S307: Copy the slow weight to the fast weight;

[0118] Step S308: Based on the replay dataset, the slow weights, and the mapping value, update the fast weights using a classification loss function, where the classification loss function is the loss function in the few-shot continuous learning model.

[0119] In this embodiment of the invention, by implementing steps S305 to S308, the historical training dataset corresponding to the historical task can be added to the training dataset corresponding to the current task to obtain the replay dataset. Furthermore, the fast weights can be updated using the replay dataset, slow weights, and mapping values, so that the few-shot continuous learning model can simultaneously achieve few-shot learning and continuous learning based on both slow and fast weights, thereby improving the training effect of the few-shot continuous learning model.

[0120] In this embodiment of the invention, since updating the fast weights is to improve the continuous learning capability of the few-shot continuous learning model, in order to avoid the few-shot continuous learning model from catastrophically forgetting the learned historical tasks, the fast weights can be updated in multiple steps through memory replay. That is, the historical training dataset of the historical tasks can be replayed into the training dataset of the current task to obtain a replay dataset D containing the historical training dataset and the current training dataset. 1:t Therefore, the fast weights can be updated by continuously learning the classification loss function L of the model using small samples, that is:

[0121]

[0122] As can be seen, the classification loss function L can be used based on the replay dataset D. 1:t Slow weight θ s and mapping values For fast weights θ f Update.

[0123] Step S309: Update the parameters in the slow weights using the updated fast weights, and train the few-sample continuous learning model based on the updated fast weights and the slow weights.

[0124] Step S310: When it is detected that there is a corresponding next task for the current task, the next task is determined as the current task, and the process of obtaining the training dataset corresponding to the current task is executed.

[0125] Step S311: When it is detected that there is no corresponding next task for the current task, it is determined that the training of the few-shot continuous learning model is completed, and the performance of the few-shot continuous learning model is verified by the verification dataset corresponding to each task, so as to obtain the performance verification result of the few-shot continuous learning model.

[0126] In this embodiment of the invention, by implementing steps S302 to S305, it is possible to detect whether there is a task in the task sequence that has not yet been trained, that is, whether there is a next task. If there is a next task, the next task can be learned again through the above steps. If there is no next task, it can be determined that the training of the few-shot continuous learning model is complete. The few-shot continuous learning model can be verified through a verification dataset to determine the training effect of the model based on the verification results, thus ensuring the comprehensiveness of the training of the few-shot continuous learning model.

[0127] The technical solution of this invention can balance the generalization ability of few-shot learning and the fitting ability of continuous learning within the same model, thereby improving the processing performance of the few-shot continuous learning model for the entire task sequence. Furthermore, it can ensure the correlation between the few-shot continuous learning model and the slow and fast weights. It can also improve the accuracy of calculating the current active label. Furthermore, it can make the obtained mapping values ​​more accurate. Furthermore, it can ensure that the few-shot continuous learning model can perform normal learning based on the slow weights. Furthermore, it can improve the training effect of the few-shot continuous learning model. Furthermore, it can ensure the comprehensiveness of the training of the few-shot continuous learning model.

[0128] Exemplary apparatus

[0129] After introducing the method of exemplary embodiments of the present invention, the following references are made. Figure 4 A training apparatus for a few-shot continuous learning model according to an exemplary embodiment of the present invention will be described, the apparatus comprising:

[0130] The first computing unit 401 is used to calculate the current activity label corresponding to the slow weight based on the training dataset corresponding to the current task; the few-shot continuous learning model includes slow weight and fast weight;

[0131] The second calculation unit 402 is used to calculate a mapping value based on the current activity tag obtained by the first calculation unit 401 and the cumulative activity tag stored by the prior task. The mapping value is used to constrain the update of the fast weight.

[0132] The copying unit 403 is used to copy the slow weights to the fast weights and update the fast weights using a classification loss function;

[0133] The update unit 404 is used to update the parameters in the slow weights by using the fast weights updated by the copy unit 403, and to train the few-sample continuous learning model based on the updated fast weights and the slow weights.

[0134] As an optional implementation, the apparatus may further include:

[0135] The acquisition unit is used to acquire a pre-set support dataset before the first calculation unit 401 calculates the current activity tag corresponding to the slow weight based on the training dataset corresponding to the current task;

[0136] The training unit is used to pre-train based on the supporting dataset to obtain slow weights.

[0137] In implementing this method,

[0138] Before the few-shot continuous learning model learns the task, the slow weights can be pre-trained using a pre-set support training set to obtain the initial slow weights, thus ensuring that the few-shot continuous learning model can learn normally based on these slow weights.

[0139] As an optional implementation, the few-shot continuous learning model may include a feature embedding layer and an output layer, wherein the slow weights are composed of parameters in the feature embedding layer and parameters in the output layer, and the fast weights are composed of parameters in the feature embedding layer and parameters in the output layer.

[0140] By implementing this method, it can be seen that slow weights and fast weights can be obtained through the parameters in the feature embedding layer and the parameters in the output layer of the few-shot continuous learning model, thus ensuring the correlation between the few-shot continuous learning model and the slow and fast weights.

[0141] As an optional implementation, the first computing unit 401 may include:

[0142] The first acquisition subunit is used to acquire the training dataset corresponding to the current task;

[0143] The first computational subunit is used to compute the training dataset to obtain the magnitude of the expected gradient of each parameter in each layer of the slow-weight feature embedding layer.

[0144] A subunit is determined to identify the current active flag corresponding to the slow weight, with the modulus being the same as the current active flag.

[0145] In implementing this method,

[0146] The accuracy of calculating the current activity label can be improved by calculating the slow weight corresponding to the current activity label on the training dataset corresponding to the current task.

[0147] As an optional implementation, the second computing unit 402 may include:

[0148] The second acquisition subunit is used to acquire the cumulative activity flags corresponding to previously stored historical tasks;

[0149] The first update subunit is used to update the cumulative activity marker using the current activity marker;

[0150] The second calculation subunit is used to calculate the difference between the updated cumulative activity marker and the mean of the current activity marker;

[0151] The mapping subunit is used to map the difference of the mean using the Sigmoid function to obtain the mapped value.

[0152] In this implementation, the cumulative activity markers corresponding to historical tasks can be updated using the current activity markers, and a mapping value can be calculated using the current activity markers and the cumulative activity markers to make the obtained mapping value more accurate.

[0153] As an optional implementation, the copying unit 403 may include:

[0154] The third acquisition subunit is used to acquire the historical training dataset corresponding to the historical task.

[0155] Add a sub-unit to add the historical training dataset to the training dataset corresponding to the current task to obtain the replay dataset;

[0156] A copying subunit is used to copy the slow weight to the fast weight;

[0157] The second update subunit is used to update the fast weights based on the replay dataset, the slow weights, and the mapping value, using a classification loss function, where the classification loss function is the loss function in the few-shot continuous learning model.

[0158] In this implementation, the historical training dataset corresponding to the historical task can be added to the training dataset corresponding to the current task to obtain the replay dataset. The fast weights can be updated using the replay dataset, slow weights, and mapping values, so that the few-shot continuous learning model can achieve few-shot learning and continuous learning simultaneously based on slow weights and fast weights, thereby improving the training effect of the few-shot continuous learning model.

[0159] As an optional implementation, the apparatus may further include:

[0160] The determining unit is configured to update the parameters in the slow weights by the updated fast weights in the update unit 404, and to train the small sample continuous learning model based on the updated fast weights and the slow weights, and to determine the next task as the current task when the current task is detected to have a corresponding next task, and to control the first obtaining subunit to obtain the training dataset corresponding to the current task.

[0161] The verification unit is used to determine that the few-shot continuous learning model has been trained when it is detected that there is no corresponding next task for the current task, and to verify the performance of the few-shot continuous learning model through the verification datasets corresponding to each task, so as to obtain the performance verification result of the few-shot continuous learning model.

[0162] This implementation method can detect whether there are any untrained tasks in the task sequence, i.e., whether there is a next task. If there is a next task, the above steps can be used to learn the next task again. If there is no next task, it can be determined that the training of the few-shot continuous learning model is complete. The few-shot continuous learning model can be validated using a validation dataset to determine the training effect of the model based on the validation results, thus ensuring the comprehensiveness of the training of the few-shot continuous learning model.

[0163] Exemplary medium

[0164] After introducing the methods and apparatus of exemplary embodiments of the present invention, the following references are made. Figure 5 A computer-readable storage medium according to exemplary embodiments of the present invention will be described, please refer to... Figure 5 The computer-readable storage medium shown is an optical disc 50, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it implements the steps described in the above method implementation. For example, the few-shot continuous learning model includes slow weights and fast weights. Based on the training dataset corresponding to the current task, the current activity label corresponding to the slow weight is calculated; a mapping value is calculated based on the current activity label and the cumulative activity labels stored by the previous task; the slow weight is copied to the fast weight, and the fast weight is updated using a classification loss function; the parameters in the slow weight are updated using the updated fast weight, and the few-shot continuous learning model is trained based on the updated fast weight and the slow weight; the specific implementation of each step will not be repeated here.

[0165] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0166] Exemplary computing device

[0167] After introducing the methods, media, and apparatus of exemplary embodiments of the present invention, the following references are made. Figure 6 A computing device for training a few-shot continuous learning model according to an exemplary embodiment of the present invention.

[0168] Figure 6 A block diagram is shown of an exemplary computing device 60 suitable for implementing embodiments of the present invention. The computing device 60 may be a computer system or a server. Figure 6 The computing device 60 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0169] like Figure 6 As shown, the components of computing device 60 may include, but are not limited to: one or more processors or processing units 601, system memory 602, and bus 603 connecting different system components (including system memory 602 and processing unit 601).

[0170] The computing device 60 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computing device 60, including volatile and non-volatile media, removable and non-removable media.

[0171] System memory 602 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 6021 and / or cache memory 6022. Computing device 60 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, ROM 6023 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 6 Not shown in the image (usually referred to as a "hard drive"). Although not shown in Figure 6The diagram illustrates that disk drives for reading and writing to removable non-volatile disks (e.g., "floppy disks") and optical disc drives for reading and writing to removable non-volatile optical discs (e.g., CD-ROMs, DVD-ROMs, or other optical media) can be provided. In these cases, each drive can be connected to bus 603 via one or more data media interfaces. System memory 602 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0172] A program / utility 6025 having a set (at least one) of program modules 6024 may be stored, for example, in system memory 602, and such program modules 6024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment. Program modules 6024 typically perform the functions and / or methods described in the embodiments of the present invention.

[0173] The computing device 60 can also communicate with one or more external devices 604 (such as a keyboard, pointing device, display, etc.). This communication can be performed via the input / output (I / O) interface 605. Furthermore, the computing device 60 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 606. Figure 6 As shown, network adapter 606 communicates with other modules of computing device 60 (such as processing unit 601) via bus 603. It should be understood that, although... Figure 6 Other hardware and / or software modules may be used in conjunction with computing device 60, as not shown in the diagram.

[0174] The processing unit 601 executes various functional applications and data processing by running programs stored in the system memory 602. For example, the few-shot continuous learning model includes slow weights and fast weights. Based on the training dataset corresponding to the current task, the current activity label corresponding to the slow weight is calculated; a mapping value is calculated based on the current activity label and the cumulative activity labels stored by the previous task; the slow weight is copied to the fast weight, and the fast weight is updated using a classification loss function; the parameters in the slow weight are updated using the updated fast weight, and the few-shot continuous learning model is trained based on the updated fast weight and the slow weight. The specific implementation of each step will not be repeated here. It should be noted that although several units / modules or sub-units / sub-modules of the training device for the few-shot continuous learning model are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules for embodiment.

[0175] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0176] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0177] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0178] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0179] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0180] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0181] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0182] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0183] Based on the above description, the embodiments of the present invention provide the following technical solutions, but are not limited thereto:

[0184] 1. A training method for a few-shot continuous learning model, wherein the few-shot continuous learning model includes slow weights and fast weights, the method comprising:

[0185] Based on the training dataset corresponding to the current task, calculate the current activity tag corresponding to the slow weight;

[0186] Based on the current activity marker and the cumulative activity marker stored by prior tasks, a mapping value is calculated, which is used to constrain the update of the fast weight;

[0187] The slow weights are copied to the fast weights, and the fast weights are updated using a classification loss function;

[0188] The parameters in the slow weights are updated by updating the fast weights, and the training of the few-sample continuous learning model is achieved based on the updated fast weights and the slow weights.

[0189] 2. The training method for the few-shot continuous learning model as described in Scheme 1, before calculating the current activity label corresponding to the slow weight based on the training dataset corresponding to the current task, the method further includes:

[0190] Obtain the pre-set support dataset;

[0191] Slow weights are obtained by pre-training based on the aforementioned support dataset.

[0192] 3. The training method for the few-shot continuous learning model as described in Scheme 2, wherein the few-shot continuous learning model includes a feature embedding layer and an output layer, the slow weights are composed of parameters in the feature embedding layer and parameters in the output layer, and the fast weights are composed of parameters in the feature embedding layer and parameters in the output layer.

[0193] 4. The training method for the few-shot continuous learning model as described in Scheme 3, based on the training dataset corresponding to the current task, calculates the current activity label corresponding to the slow weight, including:

[0194] Get the training dataset corresponding to the current task;

[0195] The training dataset is used to calculate the magnitude of the expected gradient of each parameter in each layer of the slow-weight feature embedding layer.

[0196] The modulus is determined to be the current active flag corresponding to the slow weight.

[0197] 5. The training method for the few-shot continuous learning model as described in Scheme 4, based on the current activity tag and the cumulative activity tags stored by prior tasks, calculates a mapping value, including:

[0198] Retrieve the cumulative activity flags corresponding to previously stored historical tasks;

[0199] Update the cumulative activity marker using the current activity marker;

[0200] The difference between the updated cumulative activity marker and the mean of the current activity marker is calculated.

[0201] The difference between the means is mapped using the Sigmoid function to obtain the mapped value.

[0202] 6. The training method for the few-shot continuous learning model as described in any one of schemes 1 to 5, comprising copying the slow weights to the fast weights and updating the fast weights using a classification loss function, including:

[0203] Obtain the historical training dataset corresponding to the historical task;

[0204] The historical training dataset is added to the training dataset corresponding to the current task to obtain the replay dataset;

[0205] Copy the slow weight to the fast weight;

[0206] Based on the replay dataset, the slow weights, and the mapping values, the fast weights are updated using a classification loss function, which is the loss function in the few-shot continuous learning model.

[0207] 7. The training method for the few-shot continuous learning model as described in Scheme 6, after updating the parameters in the slow weights by updating the fast weights, and training the few-shot continuous learning model based on the updated fast weights and the slow weights, the method further includes:

[0208] When it is detected that there is a corresponding next task for the current task, the next task is determined as the current task, and the process of obtaining the training dataset corresponding to the current task is executed.

[0209] When it is detected that there is no corresponding next task for the current task, it is determined that the training of the few-shot continuous learning model is complete, and the performance of the few-shot continuous learning model is verified by the verification dataset corresponding to each task, so as to obtain the performance verification result of the few-shot continuous learning model.

[0210] 8. A training apparatus for a few-shot continuous learning model, wherein the few-shot continuous learning model includes slow weights and fast weights, the apparatus comprising:

[0211] The first computing unit is used to calculate the current activity tag corresponding to the slow weight based on the training dataset corresponding to the current task;

[0212] The second calculation unit is used to calculate a mapping value based on the current activity tag and the cumulative activity tags stored by the prior tasks, and the mapping value is used to constrain the update of the fast weight;

[0213] The copying unit is used to copy the slow weights to the fast weights and update the fast weights using a classification loss function;

[0214] The update unit is used to update the parameters in the slow weights using the updated fast weights, and to train the few-sample continuous learning model based on the updated fast weights and the slow weights.

[0215] 9. The training apparatus for the few-shot continuous learning model as described in Scheme 8, the apparatus further comprising:

[0216] The acquisition unit is used to acquire a pre-set support dataset before the first calculation unit calculates the current activity tag corresponding to the slow weight based on the training dataset corresponding to the current task;

[0217] The training unit is used to pre-train based on the supporting dataset to obtain slow weights.

[0218] 10. The training apparatus for the few-shot continuous learning model as described in Scheme 9, wherein the few-shot continuous learning model includes a feature embedding layer and an output layer, the slow weights are composed of parameters in the feature embedding layer and parameters in the output layer, and the fast weights are composed of parameters in the feature embedding layer and parameters in the output layer.

[0219] 11. The training apparatus for the few-shot continuous learning model as described in Scheme 10, wherein the first computing unit comprises:

[0220] The first acquisition subunit is used to acquire the training dataset corresponding to the current task;

[0221] The first computational subunit is used to compute the training dataset to obtain the magnitude of the expected gradient of each parameter in each layer of the slow-weight feature embedding layer.

[0222] A subunit is determined to identify the current active flag corresponding to the slow weight, with the modulus being the same as the current active flag.

[0223] 12. The training apparatus for the few-shot continuous learning model as described in Scheme 11, wherein the second computing unit comprises:

[0224] The second acquisition subunit is used to acquire the cumulative activity flags corresponding to previously stored historical tasks;

[0225] The first update subunit is used to update the cumulative activity marker using the current activity marker;

[0226] The second calculation subunit is used to calculate the difference between the updated cumulative activity marker and the mean of the current activity marker;

[0227] The mapping subunit is used to map the difference of the mean using the Sigmoid function to obtain the mapped value.

[0228] 13. The training apparatus for a few-shot continuous learning model as described in any one of claims 8 to 12, wherein the replication unit comprises:

[0229] The third acquisition subunit is used to acquire the historical training dataset corresponding to the historical task.

[0230] Add a sub-unit to add the historical training dataset to the training dataset corresponding to the current task to obtain the replay dataset;

[0231] A copying subunit is used to copy the slow weight to the fast weight;

[0232] The second update subunit is used to update the fast weights based on the replay dataset, the slow weights, and the mapping value, using a classification loss function, where the classification loss function is the loss function in the few-shot continuous learning model.

[0233] 14. The training apparatus for the few-shot continuous learning model as described in Scheme 13, the apparatus further comprising:

[0234] The determining unit is configured to, after the updating unit updates the parameters in the slow weights through the updated fast weights and trains the few-shot continuous learning model based on the updated fast weights and the slow weights, and when it is detected that there is a corresponding next task for the current task, determine the next task as the current task and control the first obtaining subunit to obtain the training dataset corresponding to the current task.

[0235] The verification unit is used to determine that the few-shot continuous learning model has been trained when it is detected that there is no corresponding next task for the current task, and to verify the performance of the few-shot continuous learning model through the verification datasets corresponding to each task, so as to obtain the performance verification result of the few-shot continuous learning model.

[0236] 15. A storage medium storing a program, wherein the storage medium stores a computer program, which, when executed by a processor, implements a training method for a training model of a few-shot continuous learning model as described in any one of claims 1-7 above.

[0237] 16. A computing device comprising a storage medium as described in embodiment 15 above.

Claims

1. A method for training a small sample continual learning model, the small sample continual learning model comprising slow weights and fast weights, the small sample continual learning model being an image classification model, the method comprising: calculating a current activity label corresponding to the slow weights based on a training data set corresponding to a current task; the current task being an image classification task, the training data set comprising training data of image samples; calculating a mapping value based on the current activity label and a cumulative activity label stored by a previous task, the mapping value being used to constrain updating of the fast weights; copying the slow weights to the fast weights, and updating the fast weights by using a classification loss function; updating parameters in the slow weights by using the updated fast weights, and training the image classification model based on the updated fast weights and the slow weights; the image classification model comprising a feature embedding layer and an output layer, the slow weights comprising parameters in the feature embedding layer and parameters in the output layer, the fast weights comprising parameters in the feature embedding layer and parameters in the output layer; calculating the current activity label corresponding to the slow weights based on the training data of image samples corresponding to the current task, comprising: obtaining the training data of image samples corresponding to the current task; calculating the training data of the image samples to obtain a length of a module of each parameter gradient expectation in each layer of the feature embedding layer of the slow weights; and determining the length of the module as the current activity label corresponding to the slow weights. 2.The method of claim 1, before calculating the current activity label corresponding to the slow weights based on the training data set corresponding to the current task, the method further comprising: obtaining a pre-set support data set; and pre-training based on the support data set to obtain the slow weights. 3.The method of claim 1, calculating the mapping value based on the current activity label and the cumulative activity label stored by the previous task, comprising: obtaining a cumulative activity label corresponding to a historical task stored in advance; updating the cumulative activity label by using the current activity label; calculating a difference between a mean value of the updated cumulative activity label and the current activity label; and mapping the difference between the mean value by using a Sigmoid function to obtain the mapping value. 4.The method of any one of claims 1-3, copying the slow weights to the fast weights, and updating the fast weights by using the classification loss function, comprising: obtaining a historical training data set corresponding to a historical task; adding the historical training data set to the training data set corresponding to the current task to obtain a replay data set; copying the slow weights to the fast weights; and updating the fast weights by using the replay data set, the slow weights and the mapping value based on a classification loss function, the classification loss function being a loss function in the small sample continual learning model. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 5. The method of claim 4, wherein the parameters in the slow weights are updated by the updated fast weights, and after the training of the small sample continual learning model based on the updated fast weights and the slow weights, the method further comprises: when it is detected that the current task has a next task, determining the next task as the current task, and performing the obtaining of the training data set corresponding to the current task; and when it is detected that the current task has no next task, determining that the training of the small sample continual learning model is completed, and verifying the performance of the small sample continual learning model by the validation data set corresponding to each task to obtain a performance verification result of the small sample continual learning model.

6. A device for training a small sample continual learning model, the small sample continual learning model comprising slow weights and fast weights, the small sample continual learning model being an image classification model, the device comprising: a first computing unit configured to calculate a current activity label corresponding to the slow weights based on a training data set corresponding to a current task; the current task being an image classification task, and the training data set comprising training data of image samples; a second computing unit configured to calculate a mapping value based on the current activity label and a cumulative activity label stored by a previous task, the mapping value being used to constrain the update of the fast weights; a copying unit configured to copy the slow weights to the fast weights, and update the fast weights by a classification loss function; and an updating unit configured to update the parameters in the slow weights by the updated fast weights, and train the image classification model based on the updated fast weights and the slow weights. The image classification model comprises a feature embedding layer and an output layer, the slow weights are composed of parameters in the feature embedding layer and parameters in the output layer, and the fast weights are composed of parameters in the feature embedding layer and parameters in the output layer. The first computing unit comprises: a first obtaining subunit configured to obtain training data of image samples corresponding to the current task; a first computing subunit configured to calculate a length of a module of each parameter gradient expectation in each layer of the feature embedding layer of the slow weights based on the training data of the image samples; and a determining subunit configured to determine the length of the module as the current activity label corresponding to the slow weights.

7. The device of claim 6, further comprising: an obtaining unit configured to obtain a pre-set support data set before the first computing unit calculates the current activity label corresponding to the slow weights based on the training data of the image samples corresponding to the current task; and a training unit configured to pre-train based on the support data set to obtain the slow weights.

8. The device of claim 6, wherein the second computing unit comprises: a second obtaining subunit configured to obtain a cumulative activity label corresponding to a previous stored historical task; and a first updating subunit configured to update the cumulative activity label by the current activity label. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ a second calculation subunit configured to calculate a difference between an updated cumulative activity marker and a mean of the current activity marker; a mapping subunit configured to map the difference between the mean by a Sigmoid function to obtain a mapping value.

9. The training apparatus of the small sample continual learning model according to any one of claims 6-8, wherein the copying unit comprises: a third acquisition subunit configured to acquire a historical training data set corresponding to a historical task; an adding subunit configured to add the historical training data set to a training data set corresponding to the current task to obtain a replay data set; a copying subunit configured to copy the slow weight to the fast weight; a second update subunit configured to update the fast weight by a classification loss function based on the replay data set, the slow weight and the mapping value, the classification loss function being a loss function in the small sample continual learning model.

10. The training apparatus of the small sample continual learning model according to claim 9, further comprising: a determination unit configured to, after the update unit updates the parameters in the slow weight by the updated fast weight and based on the updated fast weight and the slow weight, implement training of the small sample continual learning model, and when it is detected that there is a next task corresponding to the current task, determine the next task as the current task and control the first acquisition subunit to acquire a training data set corresponding to the current task; a verification unit configured to, when it is detected that there is no next task corresponding to the current task, determine that the training of the small sample continual learning model is completed, and verify performance of the small sample continual learning model by a verification data set corresponding to each task to obtain a performance verification result of the small sample continual learning model.

11. A storage medium storing a program, in which, The storage medium stores a computer program, and the computer program is executed by the processor to implement the training method of the small sample continual learning model according to any one of claims 1-5.

12. A computing device comprising the storage medium according to claim 11.

Citation Information

Patent Citations

  • Deep learning medical diagnosis system based on fast weight mechanism

    CN109119159A

  • Neural network model based on SELU and FW mechanism and learning method

    CN110288080A