set_dl_model_param
名称
set_dl_model_param
—设置深度学习模型的参数。
签名
set_dl_model_param( : : DLModelHandle, GenParamName, GenParamValue : )
描述
set_dl_model_param
将深度学习模型的参数和超参数设置 为值。 GenParamName
DLModelHandle
GenParamValue
这些值可以达到的程度取决于模型类型:有些参数可以为任何深度学习模型设置,而其他参数只能为特定模型类型设置。特定参数的描述在中给出 ,唯一的例外是'runtime_init',因为您只能设置其值而不能检索它。在本文中,我们还将概述可以设置哪种类型的模型以及使用哪种运算符。 GenParamName
get_dl_model_param
get_dl_model_param
在下面的列表中,我们列出了您可以使用此运算符设置的参数,这些参数根据模型类型进行了排序。 GenParamName
set_dl_model_param
Any Model (任何模型)
'batch_size'
'class_ids'
'gpu'
'learning_rate'
'动量'
'运行'
'runtime_init':如果立即调用,则GPU内存被初始化并创建相应的句柄。否则,将按需完成此操作,这可能导致或 的首次调用的执行时间大大增加。
apply_dl_model
train_dl_model_batch
如果随后更改了网络体系结构,则会重新初始化GPU内存。例如,对于“ batch_size”或 “ image_dimensions”的更改以及随后的调用, 可能会发生这种情况。
set_dl_model_param
注意,如果在CPU上运行,则此参数无效,因此,如果将'runtime'设置为'cpu'。
'weight_prior'
Models of 'type'='detection' (即目标检测)
'max_overlap'
'max_overlap_class_agnostic'
'max_num_detections'
'min_confidence'
Models of 'type'='segmentation' (即语义分割)
'ignore_class_ids'
'image_dimensions'
'image_height', 'image_width'
'image_num_channels'
'image_range_max', 'image_range_min'
注意
要成功设置'gpu'参数,需要cuDNN和cuBLAS,即将参数'runtime'设置 为'gpu'。有关更多详细信息,请参阅“深度学习要求”段落。 GenParamName
“Installation Guide”
执行信息
多线程类型:可重入(与非排他运算符并行运行)。
多线程作用域:全局(可以从任何线程调用)。
未经并行处理。
参量
DLModelHandle
(input_control) dl_model (句柄)→
深度学习模型的句柄。
GenParamName
(input_control) attribute.name (字符串)→
通用参数的名称。
默认值: “ learning_rate”
值列表:“ batch_size”,“ class_ids”,“ gpu”,“ ignore_class_ids”,“ image_dimensions”,“ image_height”,“ image_num_channels”,“ image_range_max”,“ image_range_min”,“ image_width”,“ learning_rate”,“ max_num_detections” ','max_overlap' ,'max_overlap_class_agnostic' ,'min_confidence' ,'势头','运行','runtime_init','weight_prior'
GenParamValue
(input_control) attribute.value(-array)(实数/字符串/整数)→
通用参数的值。
默认值: 0.001
建议值: 1、2、3、50,[80,60],80、60、0.001,-127、128,“ cpu”,“ gpu”,“立即”
结果
如果参数有效,则操作员 返回值2(H_MSG_TRUE)。如有必要,将引发异常。set_dl_model_param
可能的前辈
read_dl_model
get_dl_model_param
可能的继任者
get_dl_model_param
apply_dl_model
train_dl_model_batch
也可以看看
get_dl_model_param

