clear_dl_modelT_clear_dl_modelClearDlModelClearDlModelclear_dl_model (算子)

名称

clear_dl_modelT_clear_dl_modelClearDlModelClearDlModelclear_dl_model — 清除深度学习模型。

签名

clear_dl_model( : : DLModelHandle : )

Herror T_clear_dl_model(const Htuple DLModelHandle)

void ClearDlModel(const HTuple& DLModelHandle)

static void HDlModel::ClearDlModel(const HDlModelArray& DLModelHandle)

void HDlModel::ClearDlModel() const

static void HOperatorSet.ClearDlModel(HTuple DLModelHandle)

static void HDlModel.ClearDlModel(HDlModel[] DLModelHandle)

void HDlModel.ClearDlModel()

def clear_dl_model(dlmodel_handle: MaybeSequence[HHandle]) -> None

描述

clear_dl_modelclear_dl_modelClearDlModelClearDlModelClearDlModelclear_dl_model clears the handle of the deep learning model given by DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle and frees all memory required for the model. After calling clear_dl_modelclear_dl_modelClearDlModelClearDlModelClearDlModelclear_dl_model, the model can no longer be used and the handle DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle becomes invalid.

For further explanations to deep learning models in HALCON, see the chapter Deep Learning / Model.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle (输入控制,状态被修改)  dl_model(-array) HDlModel, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the deep learning model.

结果

If the parameters are valid, the operator clear_dl_modelclear_dl_modelClearDlModelClearDlModelClearDlModelclear_dl_model returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

可能的前趋

read_dl_modelread_dl_modelReadDlModelReadDlModelReadDlModelread_dl_model, apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModelapply_dl_model, train_dl_model_batchtrain_dl_model_batchTrainDlModelBatchTrainDlModelBatchTrainDlModelBatchtrain_dl_model_batch, train_dl_model_anomaly_datasettrain_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset

模块

基础。该算子采用动态许可机制(详见《安装指南》)。所需模块取决于算子的具体使用场景:
3D计量学、光学字符识别/光学字符验证、匹配、深度学习推理