create_dl_pruningT_create_dl_pruningCreateDlPruningCreateDlPruningcreate_dl_pruning (算子)
名称
create_dl_pruningT_create_dl_pruningCreateDlPruningCreateDlPruningcreate_dl_pruning — 创建剪枝数据句柄。
签名
void CreateDlPruning(const HTuple& DLModelHandle, const HTuple& Mode, const HTuple& GenParam, HTuple* DLPruningHandle)
HDlPrune HDlModel::CreateDlPruning(const HString& Mode, const HDict& GenParam) const
HDlPrune HDlModel::CreateDlPruning(const char* Mode, const HDict& GenParam) const
HDlPrune HDlModel::CreateDlPruning(const wchar_t* Mode, const HDict& GenParam) const
(
Windows only)
void HDlPrune::HDlPrune(const HDlModel& DLModelHandle, const HString& Mode, const HDict& GenParam)
void HDlPrune::HDlPrune(const HDlModel& DLModelHandle, const char* Mode, const HDict& GenParam)
void HDlPrune::HDlPrune(const HDlModel& DLModelHandle, const wchar_t* Mode, const HDict& GenParam)
(
Windows only)
void HDlPrune::CreateDlPruning(const HDlModel& DLModelHandle, const HString& Mode, const HDict& GenParam)
void HDlPrune::CreateDlPruning(const HDlModel& DLModelHandle, const char* Mode, const HDict& GenParam)
void HDlPrune::CreateDlPruning(const HDlModel& DLModelHandle, const wchar_t* Mode, const HDict& GenParam)
(
Windows only)
描述
算子 create_dl_pruningcreate_dl_pruningCreateDlPruningCreateDlPruningCreateDlPruningcreate_dl_pruning creates a handle
DLPruningHandleDLPruningHandleDLPruningHandleDLPruningHandleDLPruningHandledlpruning_handle.
This handle is used to pass information when pruning a deep learning model.
ModeModeModeModemodemode specifies the pruning method.
The mode implies what will be removed and also which scores are needed.
Currently only the following 'mode'"mode""mode""mode""mode""mode" is implemented:
- 'oracle'"oracle""oracle""oracle""oracle""oracle":
Kernels of convolution layers are removed.
In order to do so, a score is calculated for every (potentially removable)
kernel, indicating its importance within the given network for the images
used. See the given reference for details.
GenParamGenParamGenParamGenParamgenParamgen_param is a dictionary for setting generic parameters.
Currently no generic parameters are supported.
有关深度学习概念的说明,请参阅 深度学习 一章的引言。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
参数
DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle (输入控制) dl_model → HDlModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of a deep learning model.
ModeModeModeModemodemode (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Pruning method.
默认值:
'oracle'
"oracle"
"oracle"
"oracle"
"oracle"
"oracle"
值列表:
'oracle'"oracle""oracle""oracle""oracle""oracle"
GenParamGenParamGenParamGenParamgenParamgen_param (输入控制) dict → HDict, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Dictionary with generic parameters.
默认值:
[]
DLPruningHandleDLPruningHandleDLPruningHandleDLPruningHandleDLPruningHandledlpruning_handle (输出控制) dl_pruning → HDlPrune, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Pruning data handle.
可能的前趋
read_dl_modelread_dl_modelReadDlModelReadDlModelReadDlModelread_dl_model
可能的后继
get_dl_pruning_paramget_dl_pruning_paramGetDlPruningParamGetDlPruningParamGetDlPruningParamget_dl_pruning_param,
set_dl_model_paramset_dl_model_paramSetDlModelParamSetDlModelParamSetDlModelParamset_dl_model_param
参考文献
Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, Jan Kautz
"Pruning Convolutional Neural Networks for Resource Efficient Inference",
ICLR 2017, 5th International Conference on Learning Representations, Toulon,
France.
模块
深度学习训练