This invention proposes a continuous learning method and evaluation method to mitigate the double forgetting of visual language models. The method includes: adding two parallel paths to the
backbone network of a pre-trained visual
language model—one a task-agnostic expert path and the other a task-related
expert group path—to obtain a model based on heterogeneous expert hybridization; training the model using a two-stage training strategy, including: a first stage, freezing the task-related
expert group path and training only the task-agnostic expert path, using contrastive learning to solidify the pre-trained general knowledge of the visual
language model; a second stage, freezing the task-agnostic expert path and training only the task-related
expert group path, using a cross-entropy
loss function to learn task-
specific knowledge; and an
inference stage, dynamically fusing the outputs of the two parallel paths through a
hierarchical routing mechanism to achieve collaborative learning of pre-trained knowledge and task-
specific knowledge.