train_dl_model_anomaly_datasetT_train_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset (算子)

名称

train_dl_model_anomaly_datasetT_train_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset — 训练用于异常检测的深度学习模型。

签名

train_dl_model_anomaly_dataset( : : DLModelHandle, DLSamples, DLTrainParam : DLTrainResult)

Herror T_train_dl_model_anomaly_dataset(const Htuple DLModelHandle, const Htuple DLSamples, const Htuple DLTrainParam, Htuple* DLTrainResult)

void TrainDlModelAnomalyDataset(const HTuple& DLModelHandle, const HTuple& DLSamples, const HTuple& DLTrainParam, HTuple* DLTrainResult)

HDict HDlModel::TrainDlModelAnomalyDataset(const HDictArray& DLSamples, const HDict& DLTrainParam) const

static void HOperatorSet.TrainDlModelAnomalyDataset(HTuple DLModelHandle, HTuple DLSamples, HTuple DLTrainParam, out HTuple DLTrainResult)

HDict HDlModel.TrainDlModelAnomalyDataset(HDict[] DLSamples, HDict DLTrainParam)

def train_dl_model_anomaly_dataset(dlmodel_handle: HHandle, dlsamples: Sequence[HHandle], dltrain_param: HHandle) -> HHandle

描述

算子 train_dl_model_anomaly_datasettrain_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset performs the training of a deep learning model with 'type'"type""type""type""type""type"='anomaly_detection'"anomaly_detection""anomaly_detection""anomaly_detection""anomaly_detection""anomaly_detection" contained in DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle (for deep learning models with 'type'"type""type""type""type""type"='gc_anomaly_detection'"gc_anomaly_detection""gc_anomaly_detection""gc_anomaly_detection""gc_anomaly_detection""gc_anomaly_detection" see train_dl_model_batchtrain_dl_model_batchTrainDlModelBatchTrainDlModelBatchTrainDlModelBatchtrain_dl_model_batch).

This operator processes the full training dataset at once. This is in contrast to the operator train_dl_model_batchtrain_dl_model_batchTrainDlModelBatchTrainDlModelBatchTrainDlModelBatchtrain_dl_model_batch。The iterations over the dataset are performed internally by the operator. Consequently, you only need to call this operator once with the full training dataset to train your anomaly detection model.

The training dataset is handed over in the tuple of dictionaries DLSamplesDLSamplesDLSamplesDLSamplesDLSamplesdlsamples. See the chapter 深度学习 / 模型 for further information to the used dictionaries and their keys. The operator expects within the training dataset only images without anomaly to train the anomaly detection model.

The dictionary DLTrainParamDLTrainParamDLTrainParamDLTrainParamDLTrainParamdltrain_param can be used to change the hyperparameters. The following values are supported:

The output dictionary DLTrainResultDLTrainResultDLTrainResultDLTrainResultDLTrainResultdltrain_result contains the following values:

注意

算子 train_dl_model_anomaly_datasettrain_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset internally calls functions that might not be deterministic. Therefore, results from multiple calls of train_dl_model_anomaly_datasettrain_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset can slightly differ, although the same input values have been used.

System requirements: To run this operator on GPU by setting 'runtime'"runtime""runtime""runtime""runtime""runtime" to 'gpu'"gpu""gpu""gpu""gpu""gpu" (see get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParamget_dl_model_param), cuDNN and cuBLAS are required.更多详细信息,请参阅 “安装指南” 中的“深度学习及基于深度学习方法的要求”一章。 Alternatively, this operator can also be run on CPU by setting 'runtime'"runtime""runtime""runtime""runtime""runtime" to 'cpu'"cpu""cpu""cpu""cpu""cpu".

执行信息

参数

DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle (输入控制)  dl_model HDlModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Deep learning model handle.

DLSamplesDLSamplesDLSamplesDLSamplesDLSamplesdlsamples (输入控制)  dict-array HDict, HTupleSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Tuple of Dictionaries with input images and corresponding information.

DLTrainParamDLTrainParamDLTrainParamDLTrainParamDLTrainParamdltrain_param (输入控制)  dict HDict, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Parameter for training the anomaly detection model.

默认值: []

DLTrainResultDLTrainResultDLTrainResultDLTrainResultDLTrainResultdltrain_result (输出控制)  dict HDict, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Dictionary with the train result data.

结果

如果参数有效,算子 train_dl_model_anomaly_datasettrain_dl_model_anomaly_datasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasetTrainDlModelAnomalyDatasettrain_dl_model_anomaly_dataset 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

read_dl_modelread_dl_modelReadDlModelReadDlModelReadDlModelread_dl_model, set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParamset_dl_model_param, get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParamget_dl_model_param

可能的后继

apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModelapply_dl_model

另见

apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModelapply_dl_model

模块

基础。该算子采用动态许可机制(详见《安装指南》)。所需模块取决于算子的具体使用场景: 深度学习训练