Skip to content

extend_dl_continual_learningExtendDlContinualLearningExtendDlContinualLearningextend_dl_continual_learningT_extend_dl_continual_learningπŸ”—

Short descriptionπŸ”—

extend_dl_continual_learningExtendDlContinualLearningExtendDlContinualLearningextend_dl_continual_learningT_extend_dl_continual_learning β€” Extend a Continual Learning model with with new data.

SignatureπŸ”—

extend_dl_continual_learning( dl_model DLModelHandle, dict DLDataset, dict GenParam )void ExtendDlContinualLearning( const HTuple& DLModelHandle, const HTuple& DLDataset, const HTuple& GenParam )static void HOperatorSet.ExtendDlContinualLearning( HTuple DLModelHandle, HTuple DLDataset, HTuple genParam )def extend_dl_continual_learning( dlmodel_handle: HHandle, dldataset: HHandle, gen_param: HHandle ) -> None

Herror T_extend_dl_continual_learning( const Htuple DLModelHandle, const Htuple DLDataset, const Htuple GenParam )

DescriptionπŸ”—

extend_dl_continual_learningExtendDlContinualLearning extends a Continual Learning model DLModelHandleDLModelHandledlmodel_handle of 'type'"type" = 'classification'"classification" with new data provided by DLDatasetDLDatasetdldataset. The new data can either contain new classes that the model should learn to predict, or new samples of an existing class to improve the model for that particular class. DLModelHandleDLModelHandledlmodel_handle learns from the provided data in a manner specific to Continual Learning. After calling extend_dl_continual_learningExtendDlContinualLearning, the model will either be able to predict more classes or the internal knowledge of existing classes will have been extended, depending on the dataset provided. See Deep Learning / Continual Learning for further information.

DLDatasetDLDatasetdldataset must only contain new data which the model should learn. It is not necessary to provide data samples from previous Continual Learning training steps, because the model preserves previously learned classes. Besides extend_dl_continual_learningExtendDlContinualLearning can be called with a DLModelHandleDLModelHandledlmodel_handle optimized for an AIΒ²-interface. As a result, you can extend your Continual Learning model directly on an edge device.

The operator expects a dataset that is preprocessed by the supplied procedure preprocess_dl_dataset. Changes made within the procedure to the path of the samples are not supported and lead to errors. extend_dl_continual_learningExtendDlContinualLearning will change the ClassIDs of the provided DLDatasetDLDatasetdldataset internally to match the ClassIDs of the provided model. New unknown classes will receive a new and unused ClassID. The ClassID of known classes within DLDatasetDLDatasetdldataset will be changed to the ClassID given by the model. These changes are applied both to the provided DLDatasetDLDatasetdldataset dictionary and to all preprocessed samples on disk. This is required for correct evaluation.

The performance of the Continual Learning model can be evaluated using the procedure evaluate_dl_model. You can provide one or more datasets, containing all classes the model has been trained on or only a subset of those. It is strongly recommended to evaluate the model with test data corresponding to all classes and Continual Learning steps, so that the evaluation result accurately reflects the capabilities of the model on all relevant data.

The operator also recalculates the Out-of-Distribution threshold. Any threshold value previously set by the user will be overwritten. Confidence calibration is done only once (either in init_dl_continual_learningInitDlContinualLearning, if a dataset was provided, or in the first call to extend_dl_continual_learningExtendDlContinualLearning) and not repeated. As more classes are added, the absolute confidence values will generally decrease.

GenParamgenParamgen_param is a dictionary for setting generic parameters. Currently no generic parameters are supported.

AttentionπŸ”—

The operator makes changes to the samples of the provided dataset. If an error occurs during the changes, the dataset is incompletely adjusted and corrupted. It must then be re-read and pre-processed again. This is indicated by the operator’s error message in the event of an error.

Note that the operator does not behave additively. Adding images of the same class in several calls does not result in an identical model compared to adding the same, combined images in a single call.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator modifies the state of the following input parameters:

During execution of this operator, access to the values of these parameters must be synchronized if it is used across multiple threads.

ParametersπŸ”—

DLModelHandleDLModelHandledlmodel_handle (input_control, state is modified) dl_model β†’ (handle)HTuple (HHandle)HDlModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of a deep learning classification model initialized for Continual Learning.

DLDatasetDLDatasetdldataset (input_control, state is modified) dict β†’ (handle)HTuple (HHandle)HDict, HTuple (IntPtr)HHandleHtuple (handle)

Dataset for new Continual Learning training step.

GenParamgenParamgen_param (input_control) dict β†’ (handle)HTuple (HHandle)HDict, HTuple (IntPtr)HHandleHtuple (handle)

Dictionary for generic parameters.

Default: [][]

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

init_dl_continual_learningInitDlContinualLearning

Possible successors

apply_dl_modelApplyDlModel

ModuleπŸ”—

Deep Learning Professional