Skip to content

write_dl_modelWriteDlModelWriteDlModelwrite_dl_modelT_write_dl_modelπŸ”—

Short descriptionπŸ”—

write_dl_modelWriteDlModelWriteDlModelwrite_dl_modelT_write_dl_model β€” Write a deep learning model in a file.

SignatureπŸ”—

write_dl_model( dl_model DLModelHandle, filename.write FileName )void WriteDlModel( const HTuple& DLModelHandle, const HTuple& FileName )static void HOperatorSet.WriteDlModel( HTuple DLModelHandle, HTuple fileName )def write_dl_model( dlmodel_handle: HHandle, file_name: str ) -> None

Herror T_write_dl_model( const Htuple DLModelHandle, const Htuple FileName )

void HDlModel::WriteDlModel( const HString& FileName ) const

void HDlModel::WriteDlModel( const char* FileName ) const

void HDlModel::WriteDlModel( const wchar_t* FileName ) const (Windows only)

void HDlModel.WriteDlModel( string fileName )

DescriptionπŸ”—

write_dl_modelWriteDlModel writes the deep learning model DLModelHandleDLModelHandledlmodel_handle to the file given by FileNamefileNamefile_name. Please note that the values of the runtime specific parameters 'gpu'"gpu", 'runtime'"runtime", and 'runtime_init'"runtime_init" are not written.

The default HALCON file extension for deep learning models is '.hdl'.

The model can be read with read_dl_modelReadDlModel.

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

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πŸ”—

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

Handle of the deep learning model.

FileNamefileNamefile_name (input_control) filename.write β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Filename

File extension: .hdl

ResultπŸ”—

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

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

read_dl_modelReadDlModel, train_dl_model_batchTrainDlModelBatch, train_dl_model_anomaly_datasetTrainDlModelAnomalyDataset, set_dl_model_paramSetDlModelParam

ModuleπŸ”—

This operator uses dynamic licensing (see the β€˜Installation Guide’). Which of the following modules is required depends on the specific usage of the operator:

3D Metrology, OCR/OCV, Deep Learning Enhanced, Deep Learning Professional, Matching