get_dl_model_layerGetDlModelLayerGetDlModelLayerget_dl_model_layerT_get_dl_model_layer
Short description
get_dl_model_layerGetDlModelLayerGetDlModelLayerget_dl_model_layerT_get_dl_model_layer — Create a deep copy of the layers and all
of their graph ancestors in a given deep learning model.
Signature
get_dl_model_layer( dl_model DLModelHandle, string LayerNames, out dl_layer DLLayers )void GetDlModelLayer( const HTuple& DLModelHandle, const HTuple& LayerNames, HTuple* DLLayers )static void HOperatorSet.GetDlModelLayer( HTuple DLModelHandle, HTuple layerNames, out HTuple DLLayers )def get_dl_model_layer( dlmodel_handle: HHandle, layer_names: MaybeSequence[str] ) -> Sequence[HHandle]
def get_dl_model_layer_s( dlmodel_handle: HHandle, layer_names: MaybeSequence[str] ) -> HHandleHerror T_get_dl_model_layer( const Htuple DLModelHandle, const Htuple LayerNames, Htuple* DLLayers )
static HDlLayerArray HDlLayer::GetDlModelLayer( const HDlModel& DLModelHandle, const HTuple& LayerNames )
void HDlLayer::GetDlModelLayer( const HDlModel& DLModelHandle, const HString& LayerNames )
void HDlLayer::GetDlModelLayer( const HDlModel& DLModelHandle, const char* LayerNames )
void HDlLayer::GetDlModelLayer( const HDlModel& DLModelHandle, const wchar_t* LayerNames ) (Windows only)
HDlLayerArray HDlModel::GetDlModelLayer( const HTuple& LayerNames ) const
HDlLayer HDlModel::GetDlModelLayer( const HString& LayerNames ) const
HDlLayer HDlModel::GetDlModelLayer( const char* LayerNames ) const
HDlLayer HDlModel::GetDlModelLayer( const wchar_t* LayerNames ) const (Windows only)
static HDlLayer[] HDlLayer.GetDlModelLayer( HDlModel DLModelHandle, HTuple layerNames )
void HDlLayer.GetDlModelLayer( HDlModel DLModelHandle, string layerNames )
HDlLayer[] HDlModel.GetDlModelLayer( HTuple layerNames )
HDlLayer HDlModel.GetDlModelLayer( string layerNames )
Description
The operator get_dl_model_layerGetDlModelLayer creates a deep copy of every layer
named in LayerNameslayerNameslayer_names and all their
graph ancestors in the deep learning model DLModelHandleDLModelHandledlmodel_handle.
You can retrieve the unique layer names using get_dl_model_paramGetDlModelParam with
its option 'summary'"summary".
You might use the output layers returned in DLLayersDLLayersdllayers as inputs to
the create_dl_layer_* and create_dl_modelCreateDlModel operators in order
to create novel model architectures based on existing models.
If you want to get multiple layers of a single model, these layers have to be
specified as a LayerNameslayerNameslayer_names tuple in a single call to
get_dl_model_layerGetDlModelLayer. Doing so, you avoid multiple deep copies of graph
ancestors that are potentially shared by the layers.
Example:
| |
get_dl_model_layer(DLModelHandleOrig, ['layer_name_3', 'layer_name_6'], DLLayersOutput)GetDlModelLayer(DLModelHandleOrig, ["layer_name_3", "layer_name_6"], DLLayersOutput)GetDlModelLayer(DLModelHandleOrig, ["layer_name_3", "layer_name_6"], DLLayersOutput)get_dl_model_layer(DLModelHandleOrig, ["layer_name_3", "layer_name_6"], DLLayersOutput)get_dl_model_layer(DLModelHandleOrig, ["layer_name_3", "layer_name_6"], DLLayersOutput) |
create_dl_model([DLLayersOutput], DLModelHandle)CreateDlModel([DLLayersOutput], DLModelHandle)CreateDlModel([DLLayersOutput], DLModelHandle)create_dl_model([DLLayersOutput], DLModelHandle)create_dl_model([DLLayersOutput], DLModelHandle) |
Please note, that the output layers are copies. They contain the same weights
and settings as in the given input model but they are unique copies.
You cannot alter the existing model by changing the output layers.
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Parameters
DLModelHandleDLModelHandledlmodel_handle (input_control) dl_model → (handle)HTuple (HHandle)HDlModel, HTuple (IntPtr)HHandleHtuple (handle)
Deep learning model.
LayerNameslayerNameslayer_names (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)
Names of the layers to be copied.
DLLayersDLLayersdllayers (output_control) dl_layer(-array) → (handle)HTuple (HHandle)HDlLayer, HTuple (IntPtr)Sequence[HHandle]Htuple (handle)
Copies of layers and all of their ancestors.
Combinations with other operators
Combinations
Possible predecessors
read_dl_modelReadDlModel
Possible successors
create_dl_modelCreateDlModel, create_dl_layer_activationCreateDlLayerActivation, create_dl_layer_batch_normalizationCreateDlLayerBatchNormalization, create_dl_layer_class_id_conversionCreateDlLayerClassIdConversion, create_dl_layer_class_id_conversionCreateDlLayerClassIdConversion, create_dl_layer_concatCreateDlLayerConcat, create_dl_layer_convolutionCreateDlLayerConvolution, create_dl_layer_denseCreateDlLayerDense, create_dl_layer_depth_maxCreateDlLayerDepthMax, create_dl_layer_dropoutCreateDlLayerDropout, create_dl_layer_elementwiseCreateDlLayerElementwise, create_dl_layer_loss_cross_entropyCreateDlLayerLossCrossEntropy, create_dl_layer_loss_ctcCreateDlLayerLossCtc, create_dl_layer_loss_distanceCreateDlLayerLossDistance, create_dl_layer_loss_focalCreateDlLayerLossFocal, create_dl_layer_loss_huberCreateDlLayerLossHuber, create_dl_layer_lrnCreateDlLayerLrn, create_dl_layer_poolingCreateDlLayerPooling, create_dl_layer_reduceCreateDlLayerReduce, create_dl_layer_reshapeCreateDlLayerReshape, create_dl_layer_softmaxCreateDlLayerSoftmax, create_dl_layer_transposed_convolutionCreateDlLayerTransposedConvolution, create_dl_layer_zoom_factorCreateDlLayerZoomFactor, create_dl_layer_zoom_sizeCreateDlLayerZoomSize, create_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSize
Module
Deep Learning Professional