Skip to content

add_dl_pruning_batchAddDlPruningBatchAddDlPruningBatchadd_dl_pruning_batchT_add_dl_pruning_batch🔗

Short description🔗

add_dl_pruning_batchAddDlPruningBatchAddDlPruningBatchadd_dl_pruning_batchT_add_dl_pruning_batch — Calculate scores to prune a deep learning model.

Signature🔗

add_dl_pruning_batch( dl_model DLModelHandleToPrune, dl_pruning DLPruningHandle, dict DLSampleBatch )void AddDlPruningBatch( const HTuple& DLModelHandleToPrune, const HTuple& DLPruningHandle, const HTuple& DLSampleBatch )static void HOperatorSet.AddDlPruningBatch( HTuple DLModelHandleToPrune, HTuple DLPruningHandle, HTuple DLSampleBatch )def add_dl_pruning_batch( dlmodel_handle_to_prune: HHandle, dlpruning_handle: HHandle, dlsample_batch: Sequence[HHandle] ) -> None

Herror T_add_dl_pruning_batch( const Htuple DLModelHandleToPrune, const Htuple DLPruningHandle, const Htuple DLSampleBatch )

void HDlModel::AddDlPruningBatch( const HDlPrune& DLPruningHandle, const HDictArray& DLSampleBatch ) const

void HDlPrune::AddDlPruningBatch( const HDlModel& DLModelHandleToPrune, const HDictArray& DLSampleBatch ) const

void HDlModel.AddDlPruningBatch( HDlPrune DLPruningHandle, HDict[] DLSampleBatch )

void HDlPrune.AddDlPruningBatch( HDlModel DLModelHandleToPrune, HDict[] DLSampleBatch )

Description🔗

add_dl_pruning_batchAddDlPruningBatch calculates pruning scores for the deep learning model DLModelHandleToPruneDLModelHandleToPrunedlmodel_handle_to_prune. More precisely, the scores are calculated on the images given in DLSampleBatchDLSampleBatchdlsample_batch and internally accumulated by each call of add_dl_pruning_batchAddDlPruningBatch in the pruning data handle DLPruningHandleDLPruningHandledlpruning_handle.

The parameter DLModelHandleToPruneDLModelHandleToPrunedlmodel_handle_to_prune specifies the deep learning model to use. Note that add_dl_pruning_batchAddDlPruningBatch supports only deep learning models of type 'classification'"classification".

The parameter DLPruningHandleDLPruningHandledlpruning_handle specifies the pruning data handle, which is used to pass information as e.g., the accumulated scores or the pruning mode. See create_dl_pruningCreateDlPruning for further information about implemented pruning modes.

The parameter DLSampleBatchDLSampleBatchdlsample_batch specifies the batch with input images based on which the scores are calculated. Note that the number of images in the tuple DLSampleBatchDLSampleBatchdlsample_batch needs to be equal to the value set for the model parameter 'batch_size'"batch_size".

For an explanation of the concept of deep learning see the introduction of chapter Deep Learning.

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.

Parameters🔗

DLModelHandleToPruneDLModelHandleToPrunedlmodel_handle_to_prune (input_control) dl_model → (handle)HTuple (HHandle)HDlModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of a deep learning model to prune.

DLPruningHandleDLPruningHandledlpruning_handle (input_control) dl_pruning → (handle)HTuple (HHandle)HDlPrune, HTuple (IntPtr)HHandleHtuple (handle)

Pruning data handle.

DLSampleBatchDLSampleBatchdlsample_batch (input_control) dict-array → (handle)HTuple (HHandle)HDict, HTuple (IntPtr)Sequence[HHandle]Htuple (handle)

Tuple of dictionaries with input images.

Combinations with other operators🔗

Combinations

Possible predecessors

read_dl_modelReadDlModel, create_dl_pruningCreateDlPruning, set_dl_pruning_paramSetDlPruningParam

Possible successors

get_dl_pruning_paramGetDlPruningParam, gen_dl_pruned_modelGenDlPrunedModel

Module🔗

Deep Learning Professional