create_dl_layer_lrnT_create_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn (Operator)

Name

create_dl_layer_lrnT_create_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn — Create a LRN layer.

Signature

create_dl_layer_lrn( : : DLLayerInput, LayerName, LocalSize, Alpha, Beta, K, NormRegion, GenParamName, GenParamValue : DLLayerLRN)

Herror T_create_dl_layer_lrn(const Htuple DLLayerInput, const Htuple LayerName, const Htuple LocalSize, const Htuple Alpha, const Htuple Beta, const Htuple K, const Htuple NormRegion, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerLRN)

void CreateDlLayerLrn(const HTuple& DLLayerInput, const HTuple& LayerName, const HTuple& LocalSize, const HTuple& Alpha, const HTuple& Beta, const HTuple& K, const HTuple& NormRegion, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerLRN)

HDlLayer HDlLayer::CreateDlLayerLrn(const HString& LayerName, Hlong LocalSize, double Alpha, double Beta, double K, const HString& NormRegion, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerLrn(const HString& LayerName, Hlong LocalSize, double Alpha, double Beta, double K, const HString& NormRegion, const HString& GenParamName, const HString& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerLrn(const char* LayerName, Hlong LocalSize, double Alpha, double Beta, double K, const char* NormRegion, const char* GenParamName, const char* GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerLrn(const wchar_t* LayerName, Hlong LocalSize, double Alpha, double Beta, double K, const wchar_t* NormRegion, const wchar_t* GenParamName, const wchar_t* GenParamValue) const   (Windows only)

static void HOperatorSet.CreateDlLayerLrn(HTuple DLLayerInput, HTuple layerName, HTuple localSize, HTuple alpha, HTuple beta, HTuple k, HTuple normRegion, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerLRN)

HDlLayer HDlLayer.CreateDlLayerLrn(string layerName, int localSize, double alpha, double beta, double k, string normRegion, HTuple genParamName, HTuple genParamValue)

HDlLayer HDlLayer.CreateDlLayerLrn(string layerName, int localSize, double alpha, double beta, double k, string normRegion, string genParamName, string genParamValue)

def create_dl_layer_lrn(dllayer_input: HHandle, layer_name: str, local_size: int, alpha: float, beta: float, k: float, norm_region: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

The operator create_dl_layer_lrncreate_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn creates a local response normalization layer which performs normalization over a local window and whose handle is returned in DLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNdllayer_lrn. Currently, only 'across_channels'"across_channels""across_channels""across_channels""across_channels""across_channels" can be set for NormRegionNormRegionNormRegionNormRegionnormRegionnorm_region, which results in a normalization across the channel dimension. More detailed, a value located in a channel with index is normalized with a scale factor depending on a local window,

where is the size of the local window given by LocalSizeLocalSizeLocalSizeLocalSizelocalSizelocal_size, is the total number of channels, is the scaling parameter AlphaAlphaAlphaAlphaalphaalpha (used as a normalization constant), the exponent BetaBetaBetaBetabetabeta (used as a contrast constant), and is a constant summand KKKKkk, which is used to avoid any singularities.

The parameter DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input determines the feeding input layer and expects the layer handle as value.

The parameter LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name sets an individual layer name. Note that if creating a model using create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelCreateDlModelcreate_dl_model each layer of the created network must have an unique name.

The following generic parameters GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and the corresponding values GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are supported:

'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output":

Determines whether apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModelapply_dl_model will include the output of this layer in the dictionary DLResultBatchDLResultBatchDLResultBatchDLResultBatchDLResultBatchdlresult_batch even without specifying this layer in OutputsOutputsOutputsOutputsoutputsoutputs ('true'"true""true""true""true""true") or not ('false'"false""false""false""false""false").

Default: 'false'"false""false""false""false""false"

'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params":

Number of trainable parameters (weights and biases) of the layer.

Certain parameters of layers created using this operator create_dl_layer_lrncreate_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn can be set and retrieved using further operators. The following tables give an overview, which parameters can be set using set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and which ones can be retrieved using get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param or get_dl_layer_paramget_dl_layer_paramGetDlLayerParamGetDlLayerParamGetDlLayerParamget_dl_layer_param. Note, the operators set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param require a model created by create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelCreateDlModelcreate_dl_model.

Layer Parameters set get
'alpha'"alpha""alpha""alpha""alpha""alpha" (AlphaAlphaAlphaAlphaalphaalpha)
'beta'"beta""beta""beta""beta""beta" (BetaBetaBetaBetabetabeta)
'input_layer'"input_layer""input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input)
'k'"k""k""k""k""k" (KKKKkk)
'local_size'"local_size""local_size""local_size""local_size""local_size" (LocalSizeLocalSizeLocalSizeLocalSizelocalSizelocal_size)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'norm_region'"norm_region""norm_region""norm_region""norm_region""norm_region" (NormRegionNormRegionNormRegionNormRegionnormRegionnorm_region)
'output_layer'"output_layer""output_layer""output_layer""output_layer""output_layer" (DLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNdllayer_lrn)
'shape'"shape""shape""shape""shape""shape"
'type'"type""type""type""type""type"
Generic Layer Parameters set get
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output"
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params"

Execution Information

Parameters

DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input (input_control)  dl_layer HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Feeding layer.

LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the layer.

LocalSizeLocalSizeLocalSizeLocalSizelocalSizelocal_size (input_control)  number HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Size of the local window.

Default value: 5

AlphaAlphaAlphaAlphaalphaalpha (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Scaling factor in the LRN formula.

Default value: 0.0001

BetaBetaBetaBetabetabeta (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Exponent in the LRN formula.

Default value: 0.75

KKKKkk (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Constant summand in the LRN formula.

Default value: 1.0

NormRegionNormRegionNormRegionNormRegionnormRegionnorm_region (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

'across_channels'"across_channels""across_channels""across_channels""across_channels""across_channels".

Default value: 'across_channels' "across_channels" "across_channels" "across_channels" "across_channels" "across_channels"

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Generic input parameter names.

Default value: []

List of values: 'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Generic input parameter values.

Default value: []

Suggested values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

DLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNdllayer_lrn (output_control)  dl_layer HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

LRN layer.

Module

Deep Learning Training