Deep network model continuous learning method, system and device and storage medium

By using playback buffers and parameter freezing strategies in deep learning models, combined with stochastic gradient descent optimizer and cosine annealing learning rate scheduler, the catastrophic forgetting problem faced by deep learning models in continuous learning is solved, reducing computation and storage cost, improves the adaptability and stability of the model.

CN119089961APending Publication Date: 2024-12-06NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411221038.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing deep learning models are prone to catastrophic forgetting during the continuous learning process, and the existing continuous learning methods are costly and have high computational and storage, high complexity, difficult to adjust parameters, and limited model adaptability.

Method used

Freeze part of the network layer to protect old knowledge by setting a fixed-size playback buffer to store old task samples and mix them when training new tasks, and use a random gradient descent optimizer and cosine annealing learning rate scheduler for model updates, periodic evaluation Performance to record the best model parameters.

Benefits of technology

Effectively prevent the model from forgetting old knowledge, reducing storage and computing resource requirements, simplifying the model training process, improving adaptability and generalization capabilities, optimizing the use of computing resources, and enhancing model stability and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089961A_ABST
    Figure CN119089961A_ABST
Patent Text Reader

Abstract

The invention provides a deep network model continuous learning method, system and device, and a storage medium, and belongs to the field of machine learning, and the method comprises the steps: loading a data set; implementing a knowledge playback mechanism; implementing a parameter freezing strategy; implementing stochastic gradient descent optimization and a cosine annealing learning rate scheduler to adjust the learning rate; in the training process of each task, periodically evaluating the performance of the model on a test data set, and recording the optimal test accuracy and corresponding model parameters; and after all tasks are trained, loading the optimal model parameters of the last task, performing final evaluation on the model by using the test data set, and calculating the overall accuracy of the model. According to the method, a parameter freezing strategy and a knowledge playback mechanism are introduced, so that a previous task is not updated in a new task training process, and a model can be prevented from forgetting knowledge of an old task when learning the new task. The problems that an existing continuous learning method is high in calculation and storage cost, high in complexity and large in parameter adjustment difficulty are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine learning, and specifically relates to a method, system, device and storage medium for continuous learning of a deep network model. Background Art

[0002] In the field of artificial intelligence and machine learning, continuous learning refers to the ability of machine learning models to continue learning without forgetting previously learned tasks while continuously receiving new tasks. However, traditional deep learning models often suffer from catastrophic forgetting when faced with such continuous learning scenarios, that is, when learning new tasks, the model will seriously degrade the performance of previous tasks. This problem seriously limits the widespread promotion of deep learning in practical applications.

[0003] In order to solve the problem of catastrophic forgetting, researchers have proposed a variety of continuous learning methods, mainly including parameter regularization methods, knowledge distillation methods, playback methods and fixed feature extractors.

[0004] The regularized EWC (Elastic Weight Consolidation) method preserves the knowledge of old tasks by fixing some network parameters when training new tasks. In EWC, all parameters are involved in training new tasks, but additional constraints are imposed on those parameters marked as important by the Fisher information matrix. This means that these parameters can change, but the range of change is limited by the regularization term. EWC uses the Fisher information matrix to measure the importance of parameters and protects important parameters during the training of new tasks to reduce their range of change. This method requires calculating and storing the weight importance of each parameter, has high computational complexity, and the effect depends on the setting of the regularization term, making it difficult to generalize between different tasks.

[0005] The knowledge distillation method “distills” the knowledge of the old task into a smaller auxiliary model and uses the soft labels provided by this auxiliary model to guide the update of the main model when training a new task.

[0006] Existing playback methods are more suitable for resource-constrained applications because of the fixed-size playback buffer, which can better consider the balance between storage and computing efficiency. Although the fixed feature extractor method is simple, the adaptability of the model is limited, and it cannot fully utilize new task data to improve overall performance. It is only effective in some applications. It is mainly used for fast transfer learning and the use of existing features, but its adaptability is limited.

[0007] Therefore, parameter regularization methods (such as EWC) need to calculate and store the importance of each parameter (such as the Fisher information matrix), which places high demands on the computing resources of large-scale neural networks. Existing playback methods need to store data from old tasks or use generative models, which also increases storage and computing costs. Knowledge distillation and some more complex continuous learning algorithms (such as iCaRL, LwF, GEM) require the design of auxiliary models or complex loss functions, and require more parameter adjustments and implementation details in practical applications, which increases the difficulty of implementation and the complexity of application. Although the fixed feature extractor method is simple, it does not update some model parameters when training new tasks, which limits the adaptability of the model and cannot make full use of the data of new tasks to improve the overall performance. This method is only effective when the features of the new task are similar to those of the old task.

[0008] In summary, existing continuous learning methods have problems such as high computing and storage costs, high complexity, and difficulty in parameter adjustment. Summary of the invention

[0009] In order to solve the problems of limited model adaptability and high computational complexity in existing continuous learning methods, the present invention provides a deep network model continuous learning method to effectively deal with the catastrophic forgetting problem and achieve efficient learning of new tasks while ensuring the retention of old task knowledge.

[0010] In order to achieve the above object, the present invention provides the following technical solutions:

[0011] A method for continuous learning of a deep network model, comprising the following steps:

[0012] Load the corresponding training and testing datasets according to the task ID of the model training;

[0013] A fixed-size replay buffer is set to store the training samples of the previous task, and the training samples of the previous task are mixed into the current training dataset when training a new task to achieve knowledge replay;

[0014] Before training the model for a new task, load the best model parameters after the previous task training and freeze some of the model’s network layers so that they are not updated during the new task training process, thereby protecting the old knowledge.

[0015] During the training of the model using the training data set, the stochastic gradient descent optimizer is used to update the model parameters, and the cosine annealing learning rate scheduler is used to adjust the learning rate;

[0016] During the training process of each task, the performance of the model on the test dataset is regularly evaluated, and the best test accuracy and corresponding model parameters are recorded;

[0017] After all tasks are trained, the best model parameters of the last task are loaded, the model is finally evaluated using the test dataset, and the overall accuracy of the model is calculated.

[0018] Preferably, the data in the training data set and the test data set are video data downloaded from YAWDD via the network;

[0019] The downloaded video data is segmented into frames, the facial data corresponding to the segmented frames are cropped and resized, and key frames are selected to construct training data sets and test data sets.

[0020] Preferably, the method for confirming the optimal model parameters is:

[0021] After each task is completed, the accuracy of the trained model on all learned tasks is verified. If the accuracy is higher than that of the model before training, the trained model is the best model. After the task is completed, the model-related parameters are saved.

[0022] Preferably, before training, the model is initialized.

[0023] Preferably, the model is a deep convolutional neural network model.

[0024] The present invention also provides a deep network model continuous learning system, comprising:

[0025] The data loading module is used to load the corresponding training data set and test data set according to the task ID of the model training;

[0026] The knowledge replay module is used to set a fixed-size replay buffer to store the training samples of the previous task and mix the training samples of the previous task into the current training data set when training a new task;

[0027] The parameter freezing module is used to load the best model parameters after the previous task training before training the model for a new task, and freeze some network layers of the model so that some network layers are not updated during the new task training process;

[0028] The model training module is used to use the stochastic gradient descent optimizer to update the model parameters during the training of the model through the training data set, and the cosine annealing learning rate scheduler is used to adjust the learning rate;

[0029] The model evaluation module is used to regularly evaluate the performance of the model on the test dataset during each task training process and record the best test accuracy and corresponding model parameters;

[0030] The final test module is used to load the best model parameters of the last task after all tasks are trained, perform a final evaluation of the model using the test dataset, and calculate the overall accuracy of the model.

[0031] The final test module is used to perform the final test evaluation after all task training is completed and calculate the overall accuracy of the model. Specifically, after all task training is completed, the best model parameters of the last task are loaded, the model is finally evaluated using the test data set, and the overall accuracy of the model is calculated.

[0032] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement any one of the steps in the deep network model continuous learning method.

[0033] The present invention also provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is loaded by a processor, it can execute any one of the steps in the deep network model continuous learning method.

[0034] The deep network model continuous learning method provided by the present invention has the following beneficial effects:

[0035] The present invention realizes knowledge playback by setting a playback buffer to store the training samples of the previous task, and mixing the training samples of the previous task into the current training data set when training a new task. The storage cost is reduced by introducing a parameter freezing strategy before training, and the model can be prevented from forgetting the knowledge of the old task when learning a new task. By freezing part of the network layer, it is not updated during the training process of the new task, thereby protecting the old knowledge. At the same time, the data samples of the old task are stored in the playback buffer and mixed for use during the training of the new task, further enhancing the knowledge retention effect. At the same time, by using a stochastic gradient descent optimizer to update the model parameters during the training process, and using a cosine annealing learning rate scheduler to adjust the learning rate, the difficulty of adjusting the parameters is reduced; finally, by regularly evaluating the performance of the model on the test data set and after all task training is completed, the best model parameters of the last task are loaded, the model is finally evaluated using the test data set, and the overall accuracy of the model is calculated, thereby reducing the overall complexity of continuous learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 A flowchart of a method for continuous learning of a deep network model provided by the present invention;

[0038] Figure 2 This is the training and testing loss curve;

[0039] Figure 3 This is the test accuracy curve;

[0040] Figure 4 It is a box plot of the accuracy dispersion during training;

[0041] Figure 5 Block diagram of the continuous learning system for deep network models. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.

[0043] The present invention provides a method for continuous learning of a deep network model, specifically a method for continuous learning of a deep network model with iterative updating of network parameters. The method effectively solves the catastrophic forgetting problem faced by the deep learning model in the continuous learning process through a parameter freezing strategy and a knowledge playback mechanism. The method comprises the following steps:

[0044] Load the corresponding training dataset and test dataset according to the task ID of model training. The data in the training dataset and test dataset are the video data downloaded from YAWDD through the network. Split the downloaded video data into frames, crop and resize the corresponding facial data of the split frames, select key frames, and build the training dataset and test dataset.

[0045] A fixed-size replay buffer is set to store the training samples of the previous task, and the training samples of the previous task are mixed into the current training dataset when training a new task to achieve knowledge replay.

[0046] Before training the model for a new task, load the best model parameters after the previous task training and freeze some of the model’s network layers so that they are not updated during the new task training process, thereby protecting old knowledge.

[0047] During the training of the model using the training data set, the stochastic gradient descent optimizer is used to update the model parameters, and the cosine annealing learning rate scheduler is used to adjust the learning rate. During each task training process, the performance of the model on the test data set is regularly evaluated, and the best test accuracy and corresponding model parameters are recorded.

[0048] After all tasks are trained, the best model parameters of the last task are loaded, the model is finally evaluated using the test dataset, and the overall accuracy of the model is calculated.

[0049] The method for confirming the best model parameters is: after each task is completed, verify the accuracy of the trained model on all learned tasks. If the accuracy is higher than that of the model before training, the trained model is the best model. After the task is completed, save the model-related parameters.

[0050] Example

[0051] The following is a specific embodiment of the present invention, which is a research on a fatigue driving recognition method based on a deep convolutional neural network. Figure 1 As shown, the deep network model continuous learning method provided by the present invention comprises the following steps:

[0052] Step 1: Model initialization: Initialize a deep convolutional neural network (CNN) model, which includes multiple convolutional layers, pooling layers, fully connected layers, and activation functions.

[0053] Step 2, load task data: load the corresponding training and test data sets according to the task ID of the model training. The data set of each task is processed by the defined data loader, and appropriate data enhancement and preprocessing methods are applied. The data of the data set in this embodiment can be downloaded from the network YAWDD data set, and the data processing specifically refers to dividing the original video data into frames, cropping and resizing the corresponding facial data, and selecting key frames.

[0054] Step 3: Implement the knowledge replay mechanism: Set up a fixed-size replay buffer to store training samples of previous tasks and mix them into the current training data when training a new task to achieve knowledge replay. Specifically, when training a new task, knowledge replay is achieved by extracting a portion of old samples from the replay buffer and adding them to the training set.

[0055] Step 4, implement the parameter freezing strategy: before training the model for a new task, first load the best model parameters after the previous task training. Freeze some network layers so that they are not updated during the new task training process, thereby protecting old knowledge. Specifically, after each task is completed, verify the accuracy of the model on all learned tasks. If the accuracy is improved compared to before, the new model is the best model parameter. Freezing some network layers specifically means that in PyTorch, these layers can be frozen by setting the requires_grad attribute of certain layers to False. During the training process, some early layers of the neural network can be frozen, and some convolutional layers are frozen in the method of the present invention. The so-called freezing is to set these layers to be non-trainable, so that the original parameters cannot be changed with training, thereby achieving the purpose of protecting old knowledge.

[0056] Step 5, model training and evaluation: Use the stochastic gradient descent optimizer (SGD) to update the model parameters, and use the cosine annealing learning rate scheduler to adjust the learning rate. During each task training process, the performance of the model on the test data set is regularly evaluated, and the best test accuracy and corresponding model parameters are recorded. Specifically, the model is evaluated by verifying the accuracy of the model on all learned tasks after each task. During task training, the learning rate changes with the change of epoch, and the change curve is a cosine curve.

[0057] Figures 2 to 4 is the data curve obtained in a certain training process. Figure 2 The training loss and test loss during training are shown. Figure 3 Shows the test accuracy during training, from Figure 2 and Figure 3 It can be seen that when some new tasks come, the loss will increase and the accuracy will decrease. After training, the loss will decrease again and the accuracy will increase again. Figure 4 It is a box plot of accuracy. It can be seen that with the increase of calculation rounds, the accuracy shows an overall upward trend and the fluctuation gradually becomes smaller, which reflects that with the increase of learning rounds, the accuracy of the model on all data of all tasks is higher, which further reflects the good effect of continuous learning.

[0058] Step 6: Final test evaluation: After all tasks are trained, load the best model parameters of the last task, perform a final evaluation of the model using the test dataset, and calculate the overall accuracy of the model.

[0059] The present invention reduces the requirements for storage and computing resources by using a fixed-size playback buffer to store only a limited number of training samples of previous tasks. Compared with complete data playback or complex generative models, this method is more resource-efficient. The parameter freezing module freezes some network layers before training a new task to ensure that these layers are not updated in the new task, thereby protecting old knowledge. At the same time, the unfrozen layers can continue to adapt to the data of the new task, so that the model still has a certain ability to adapt to new tasks while retaining the old knowledge. Compared with knowledge distillation methods that require complex regularization or auxiliary models, the combination of knowledge playback and parameter freezing is simpler and more intuitive, and is easy to implement and deploy. This reduces the complexity of model design and the difficulty of parameter adjustment, making the continuous learning method easier to apply to actual scenarios.

[0060] Based on the same inventive concept, Figure 5 As shown, the present invention also provides a deep network model continuous learning system, comprising:

[0061] The data loading module is used to load the corresponding training data set and test data set according to the task ID of model training.

[0062] Model initialization module, used to initialize the deep convolutional neural network model.

[0063] The knowledge playback module is responsible for storing and managing old task data samples in the playback buffer. Specifically, a fixed-size playback buffer is set to store the training samples of previous tasks, and when training a new task, the training samples of the previous task are mixed into the current training data set to achieve knowledge playback.

[0064] The parameter freezing module is used to load the best model parameters and freeze some network layers. Specifically, before training the model for a new task, the best model parameters after the previous task training are loaded, and some network layers of the model are frozen so that some network layers are not updated during the new task training process, thereby protecting the old knowledge.

[0065] The model training module is used to perform the model training process, including forward propagation, back propagation and parameter update. Specifically, it is used to update the model parameters using the stochastic gradient descent optimizer during the model training process using the training data set, and the cosine annealing learning rate scheduler is used to adjust the learning rate.

[0066] The model evaluation module is used to evaluate the model performance during the training process and record the best model parameters. Specifically, during the training process of each task, the performance of the model on the test dataset is regularly evaluated, and the best test accuracy and corresponding model parameters are recorded.

[0067] The final test module is used to perform the final test evaluation after all task training is completed and calculate the overall accuracy of the model. Specifically, after all task training is completed, the best model parameters of the last task are loaded, the model is finally evaluated using the test data set, and the overall accuracy of the model is calculated.

[0068] Each module in the above-mentioned deep network model continuous learning system can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0069] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps in the embodiment of the method for continuous learning of a deep network model. The specific implementation method can be found in the method embodiment, which will not be repeated here.

[0070] Furthermore, the present invention also provides a non-temporary computer-readable storage medium containing instructions, and a computer program is stored on the storage medium. For example, a memory containing instructions, the above instructions can be executed by a processor of a computer device to complete the above method. For example, a non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage device. When the computer program is executed by the processor, the steps in the embodiment of the method for continuous learning of a deep network model can be implemented. The specific implementation method can be found in the method embodiment, which will not be repeated here.

[0071] The deep network model continuous learning method proposed in the present invention effectively solves the catastrophic forgetting problem faced by the prior art in the continuous learning process through parameter freezing strategy and knowledge playback mechanism. Compared with the prior art, the present invention has the following advantages:

[0072] 1. Effectively prevent catastrophic forgetting: By introducing parameter freezing strategy and knowledge replay mechanism, the present invention can prevent the model from forgetting the knowledge of old tasks when learning new tasks. Freeze some network layers so that they are not updated during the training of new tasks, thereby protecting old knowledge. At the same time, use the replay buffer to store data samples of old tasks and mix them when training new tasks, further enhancing the knowledge retention effect.

[0073] 2. Improve the adaptability and generalization ability of the model: By designing a dynamically adjusted parameter update strategy, the present invention can optimize the adaptability and generalization ability of the model to new tasks without significantly increasing the computational complexity. The cosine annealing learning rate scheduler is used to ensure that the learning rate gradually decreases during the training process of each task, thereby enhancing the stability of the model.

[0074] 3. Optimize the use of computing resources: The existing methods have the problem of high computing resource consumption. The present invention reduces unnecessary parameter updates and data storage requirements by freezing some network layers and using an efficient knowledge playback mechanism, thereby optimizing the use efficiency of computing resources and reducing training costs.

[0075] 4. Simplify the model training process: The network parameter iterative update method proposed in the present invention has high implementation simplicity and applicability. It does not require complex regularization term calculation and storage. Only through reasonable parameter freezing and knowledge playback strategies, efficient continuous learning can be achieved. It is suitable for a variety of application scenarios, especially those that require real-time updates and low computing overhead, such as driver fatigue detection systems.

[0076] 5. Enhance the stability and performance of the model: By regularly evaluating the model performance during each task training process and saving the optimal model parameters, the present invention can ensure the stability and performance of the model during the continuous learning process and gradually improve the comprehensive performance of the model on each task.

[0077] In summary, the deep network model continuous learning method of the present invention aims to overcome the shortcomings of the prior art and provide an efficient, stable, and resource-friendly solution to address the challenges faced by deep learning models in the continuous learning process.

[0078] It will be appreciated by those skilled in the art that embodiments of the present invention may provide methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0079] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0080] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0082] It should be pointed out that the specific implementation methods described above can enable those skilled in the art to understand the invention more comprehensively, but do not limit the invention in any way. Therefore, although the invention has been described in detail in this specification and embodiments, those skilled in the art should understand that the invention can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and scope of the invention are included in the protection scope of the patent for the invention. Any figure mark in the claims should not be regarded as limiting the claims involved. Any simple change or equivalent replacement of the technical solution that can be obviously obtained by any technician familiar with the field within the technical scope disclosed in the present invention belongs to the protection scope of the present invention.

Claims

1. A method for continuous learning of a deep network model, characterized in that: The following steps are involved: Load the corresponding training and testing datasets according to the task ID of the model training; Set a fixed-size replay buffer to store the training samples of the previous task, and mix the training samples of the previous task into the current training dataset when training a new task; Before training the model for a new task, load the best model parameters after the previous task training and freeze some of the model's network layers so that they are not updated during the new task training process. During the training of the model using the training data set, the stochastic gradient descent optimizer is used to update the model parameters, and the cosine annealing learning rate scheduler is used to adjust the learning rate; During the training process of each task, the performance of the model on the test dataset is regularly evaluated, and the best test accuracy and corresponding model parameters are recorded; After all tasks are trained, the best model parameters of the last task are loaded, the model is finally evaluated using the test dataset, and the overall accuracy of the model is calculated.

2. The method for continuous learning of deep network models according to claim 1, characterized in that: The data in the training data set and the test data set are video data downloaded from YAWDD via the network; The downloaded video data is segmented into frames, the facial data corresponding to the segmented frames are cropped and resized, and key frames are selected to construct training data sets and test data sets.

3. The method for continuous learning of deep network models according to claim 1, characterized in that: The method for confirming the optimal model parameters is: After each task is completed, the accuracy of the trained model on all learned tasks is verified. If the accuracy is higher than that of the model before training, the trained model is the best model. After the task is completed, the model-related parameters are saved.

4. The method for continuous learning of deep network models according to claim 1, characterized in that: Before training, the model is also initialized.

5. The method for continuous learning of deep network models according to claim 4, characterized in that: The model is a deep convolutional neural network model.

6. A deep network model continuous learning system, characterized in that: include: The data loading module is used to load the corresponding training data set and test data set according to the task ID of the model training; The knowledge replay module is used to set a fixed-size replay buffer to store the training samples of the previous task and mix the training samples of the previous task into the current training data set when training a new task; The parameter freezing module is used to load the best model parameters after the previous task training before training the model for a new task, and freeze some network layers of the model so that some network layers are not updated during the new task training process; The model training module is used to use the stochastic gradient descent optimizer to update the model parameters during the training of the model through the training data set, and the cosine annealing learning rate scheduler is used to adjust the learning rate; The model evaluation module is used to regularly evaluate the performance of the model on the test dataset during each task training process and record the best test accuracy and corresponding model parameters; The final test module is used to load the best model parameters of the last task after all tasks are trained, perform a final evaluation of the model using the test dataset, and calculate the overall accuracy of the model; The final test module is used to perform the final test evaluation after all task training is completed and calculate the overall accuracy of the model. Specifically, after all task training is completed, the best model parameters of the last task are loaded, the model is finally evaluated using the test data set, and the overall accuracy of the model is calculated.

7. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is loaded into a processor, it can execute the steps of the method according to any one of claims 1 to 5.