set_dl_model_paramT_set_dl_model_paramSetDlModelParamSetDlModelParam (Operator)
Name
set_dl_model_paramT_set_dl_model_paramSetDlModelParamSetDlModelParam
— Set the parameters of a deep learning model.
Signature
Description
set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParam
sets the parameters and hyperparameters
GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
of the deep learning model DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandle
to the values GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue
.
The values GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
can attain, depend on the model type:
There are parameters which can be set for any deep learning model while
others can only be set for specific model types.
A description of the specific parameters is given in
get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParam
, with the only exception 'runtime_init'"runtime_init""runtime_init""runtime_init""runtime_init",
as you can only set its value but not retrieve it.
In get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParam
we also give an overview,
for which type of model and using which operator a parameter can be set.
In the following we list the parameters GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
you can set
using this operator, set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParam
, sorted according to the
model type.
- Any Model
-
-
'batch_size'"batch_size""batch_size""batch_size""batch_size"
-
'class_ids'"class_ids""class_ids""class_ids""class_ids"
-
'gpu'"gpu""gpu""gpu""gpu"
-
'learning_rate'"learning_rate""learning_rate""learning_rate""learning_rate"
-
'momentum'"momentum""momentum""momentum""momentum"
-
'runtime'"runtime""runtime""runtime""runtime"
-
'runtime_init'"runtime_init""runtime_init""runtime_init""runtime_init":
If called with 'immediately'"immediately""immediately""immediately""immediately", the GPU memory is initialized
and the corresponding handle created. Otherwise this is done on
demand, which may result in significantly larger execution times for
the first call of apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModel
or
train_dl_model_batchtrain_dl_model_batchTrainDlModelBatchTrainDlModelBatchTrainDlModelBatch
.
If the network architecture is changed subsequently, the GPU memory
is reinitialized.
This can happen e.g., for changes of 'batch_size'"batch_size""batch_size""batch_size""batch_size" or
'image_dimensions'"image_dimensions""image_dimensions""image_dimensions""image_dimensions" with subsequent calls of
set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParam
.
Note, this parameter has no effect if running on CPUs,
thus if 'runtime'"runtime""runtime""runtime""runtime" is set to 'cpu'"cpu""cpu""cpu""cpu".
-
'weight_prior'"weight_prior""weight_prior""weight_prior""weight_prior"
- Models of 'type'"type""type""type""type"='detection'"detection""detection""detection""detection"
-
-
'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap"
-
'max_overlap_class_agnostic'"max_overlap_class_agnostic""max_overlap_class_agnostic""max_overlap_class_agnostic""max_overlap_class_agnostic"
-
'max_num_detections'"max_num_detections""max_num_detections""max_num_detections""max_num_detections"
-
'min_confidence'"min_confidence""min_confidence""min_confidence""min_confidence"
- Models of 'type'"type""type""type""type"='segmentation'"segmentation""segmentation""segmentation""segmentation"
-
-
'ignore_class_ids'"ignore_class_ids""ignore_class_ids""ignore_class_ids""ignore_class_ids"
-
'image_dimensions'"image_dimensions""image_dimensions""image_dimensions""image_dimensions"
-
'image_height'"image_height""image_height""image_height""image_height", 'image_width'"image_width""image_width""image_width""image_width"
-
'image_num_channels'"image_num_channels""image_num_channels""image_num_channels""image_num_channels"
-
'image_range_max'"image_range_max""image_range_max""image_range_max""image_range_max", 'image_range_min'"image_range_min""image_range_min""image_range_min""image_range_min"
Attention
To successfully set 'gpu'"gpu""gpu""gpu""gpu" parameters, cuDNN and cuBLAS are
required, i.e., to set the parameter GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
'runtime'"runtime""runtime""runtime""runtime"
to 'gpu'"gpu""gpu""gpu""gpu".
For further details, please refer to the “Installation Guide”
,
paragraph “Requirements for Deep Learning”.
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
DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandle
(input_control) dl_model →
HDlModel, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the deep learning model.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
(input_control) attribute.name →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Name of the generic parameter.
Default value:
'learning_rate'
"learning_rate"
"learning_rate"
"learning_rate"
"learning_rate"
List of values: 'batch_size'"batch_size""batch_size""batch_size""batch_size", 'class_ids'"class_ids""class_ids""class_ids""class_ids", 'gpu'"gpu""gpu""gpu""gpu", 'ignore_class_ids'"ignore_class_ids""ignore_class_ids""ignore_class_ids""ignore_class_ids", 'image_dimensions'"image_dimensions""image_dimensions""image_dimensions""image_dimensions", 'image_height'"image_height""image_height""image_height""image_height", 'image_num_channels'"image_num_channels""image_num_channels""image_num_channels""image_num_channels", 'image_range_max'"image_range_max""image_range_max""image_range_max""image_range_max", 'image_range_min'"image_range_min""image_range_min""image_range_min""image_range_min", 'image_width'"image_width""image_width""image_width""image_width", 'learning_rate'"learning_rate""learning_rate""learning_rate""learning_rate", 'max_num_detections'"max_num_detections""max_num_detections""max_num_detections""max_num_detections", 'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap", 'max_overlap_class_agnostic'"max_overlap_class_agnostic""max_overlap_class_agnostic""max_overlap_class_agnostic""max_overlap_class_agnostic", 'min_confidence'"min_confidence""min_confidence""min_confidence""min_confidence", 'momentum'"momentum""momentum""momentum""momentum", 'runtime'"runtime""runtime""runtime""runtime", 'runtime_init'"runtime_init""runtime_init""runtime_init""runtime_init", 'weight_prior'"weight_prior""weight_prior""weight_prior""weight_prior"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue
(input_control) attribute.value(-array) →
HTupleHTupleHtuple (real / string / integer) (double / string / int / long) (double / HString / Hlong) (double / char* / Hlong)
Value of the generic parameter.
Default value: 0.001
Suggested values: 1, 2, 3, 50, [80,60], 80, 60, 0.001, -127, 128, 'cpu'"cpu""cpu""cpu""cpu", 'gpu'"gpu""gpu""gpu""gpu", 'immediately'"immediately""immediately""immediately""immediately"
Result
If the parameters are valid, the operator
set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParam
returns the value 2 (H_MSG_TRUE). If
necessary, an exception is raised.
Possible Predecessors
read_dl_modelread_dl_modelReadDlModelReadDlModelReadDlModel
,
get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParam
Possible Successors
get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParam
,
apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModel
,
train_dl_model_batchtrain_dl_model_batchTrainDlModelBatchTrainDlModelBatchTrainDlModelBatch
See also
get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParam
Module
Deep Learning Training