get_dl_model_layerT_get_dl_model_layerGetDlModelLayerGetDlModelLayerget_dl_model_layer (Operator)

Name

get_dl_model_layerT_get_dl_model_layerGetDlModelLayerGetDlModelLayerget_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( : : DLModelHandle, LayerNames : DLLayers)

Herror T_get_dl_model_layer(const Htuple DLModelHandle, const Htuple LayerNames, Htuple* DLLayers)

void GetDlModelLayer(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 void HOperatorSet.GetDlModelLayer(HTuple DLModelHandle, HTuple layerNames, out HTuple DLLayers)

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)

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]) -> HHandle

Description

The operator get_dl_model_layerget_dl_model_layerGetDlModelLayerGetDlModelLayerGetDlModelLayerget_dl_model_layer creates a deep copy of every layer named in LayerNamesLayerNamesLayerNamesLayerNameslayerNameslayer_names and all their graph ancestors in the deep learning model DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle. You can retrieve the unique layer names using get_dl_model_paramget_dl_model_paramGetDlModelParamGetDlModelParamGetDlModelParamget_dl_model_param with its option 'summary'"summary""summary""summary""summary""summary".

You might use the output layers returned in DLLayersDLLayersDLLayersDLLayersDLLayersdllayers as inputs to the create_dl_layer_* and create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelCreateDlModelcreate_dl_model 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 LayerNamesLayerNamesLayerNamesLayerNameslayerNameslayer_names tuple in a single call to get_dl_model_layerget_dl_model_layerGetDlModelLayerGetDlModelLayerGetDlModelLayerget_dl_model_layer. 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)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)GetDlModelLayer(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)create_dl_model([DLLayersOutput], DLModelHandle)CreateDlModel([DLLayersOutput], DLModelHandle)CreateDlModel([DLLayersOutput], DLModelHandle)CreateDlModel([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

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

DLModelHandleDLModelHandleDLModelHandleDLModelHandleDLModelHandledlmodel_handle (input_control)  dl_model HDlModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Deep learning model.

LayerNamesLayerNamesLayerNamesLayerNameslayerNameslayer_names (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of the layers to be copied.

DLLayersDLLayersDLLayersDLLayersDLLayersdllayers (output_control)  dl_layer(-array) HDlLayer, HTupleSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Copies of layers and all of their ancestors.

Possible Predecessors

read_dl_modelread_dl_modelReadDlModelReadDlModelReadDlModelread_dl_model

Possible Successors

create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelCreateDlModelcreate_dl_model, create_dl_layer_activationcreate_dl_layer_activationCreateDlLayerActivationCreateDlLayerActivationCreateDlLayerActivationcreate_dl_layer_activation, create_dl_layer_batch_normalizationcreate_dl_layer_batch_normalizationCreateDlLayerBatchNormalizationCreateDlLayerBatchNormalizationCreateDlLayerBatchNormalizationcreate_dl_layer_batch_normalization, create_dl_layer_class_id_conversioncreate_dl_layer_class_id_conversionCreateDlLayerClassIdConversionCreateDlLayerClassIdConversionCreateDlLayerClassIdConversioncreate_dl_layer_class_id_conversion, create_dl_layer_class_id_conversioncreate_dl_layer_class_id_conversionCreateDlLayerClassIdConversionCreateDlLayerClassIdConversionCreateDlLayerClassIdConversioncreate_dl_layer_class_id_conversion, create_dl_layer_concatcreate_dl_layer_concatCreateDlLayerConcatCreateDlLayerConcatCreateDlLayerConcatcreate_dl_layer_concat, create_dl_layer_convolutioncreate_dl_layer_convolutionCreateDlLayerConvolutionCreateDlLayerConvolutionCreateDlLayerConvolutioncreate_dl_layer_convolution, create_dl_layer_densecreate_dl_layer_denseCreateDlLayerDenseCreateDlLayerDenseCreateDlLayerDensecreate_dl_layer_dense, create_dl_layer_depth_maxcreate_dl_layer_depth_maxCreateDlLayerDepthMaxCreateDlLayerDepthMaxCreateDlLayerDepthMaxcreate_dl_layer_depth_max, create_dl_layer_dropoutcreate_dl_layer_dropoutCreateDlLayerDropoutCreateDlLayerDropoutCreateDlLayerDropoutcreate_dl_layer_dropout, create_dl_layer_elementwisecreate_dl_layer_elementwiseCreateDlLayerElementwiseCreateDlLayerElementwiseCreateDlLayerElementwisecreate_dl_layer_elementwise, create_dl_layer_loss_cross_entropycreate_dl_layer_loss_cross_entropyCreateDlLayerLossCrossEntropyCreateDlLayerLossCrossEntropyCreateDlLayerLossCrossEntropycreate_dl_layer_loss_cross_entropy, create_dl_layer_loss_ctccreate_dl_layer_loss_ctcCreateDlLayerLossCtcCreateDlLayerLossCtcCreateDlLayerLossCtccreate_dl_layer_loss_ctc, create_dl_layer_loss_distancecreate_dl_layer_loss_distanceCreateDlLayerLossDistanceCreateDlLayerLossDistanceCreateDlLayerLossDistancecreate_dl_layer_loss_distance, create_dl_layer_loss_focalcreate_dl_layer_loss_focalCreateDlLayerLossFocalCreateDlLayerLossFocalCreateDlLayerLossFocalcreate_dl_layer_loss_focal, create_dl_layer_loss_hubercreate_dl_layer_loss_huberCreateDlLayerLossHuberCreateDlLayerLossHuberCreateDlLayerLossHubercreate_dl_layer_loss_huber, create_dl_layer_lrncreate_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn, create_dl_layer_poolingcreate_dl_layer_poolingCreateDlLayerPoolingCreateDlLayerPoolingCreateDlLayerPoolingcreate_dl_layer_pooling, create_dl_layer_reshapecreate_dl_layer_reshapeCreateDlLayerReshapeCreateDlLayerReshapeCreateDlLayerReshapecreate_dl_layer_reshape, create_dl_layer_softmaxcreate_dl_layer_softmaxCreateDlLayerSoftmaxCreateDlLayerSoftmaxCreateDlLayerSoftmaxcreate_dl_layer_softmax, create_dl_layer_transposed_convolutioncreate_dl_layer_transposed_convolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutionCreateDlLayerTransposedConvolutioncreate_dl_layer_transposed_convolution, create_dl_layer_zoom_factorcreate_dl_layer_zoom_factorCreateDlLayerZoomFactorCreateDlLayerZoomFactorCreateDlLayerZoomFactorcreate_dl_layer_zoom_factor, create_dl_layer_zoom_sizecreate_dl_layer_zoom_sizeCreateDlLayerZoomSizeCreateDlLayerZoomSizeCreateDlLayerZoomSizecreate_dl_layer_zoom_size, create_dl_layer_zoom_to_layer_sizecreate_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizecreate_dl_layer_zoom_to_layer_size

Module

Deep Learning Training