Operator Reference

create_dl_layer_lrnT_create_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn (Operator)

create_dl_layer_lrnT_create_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn — Create a LRN layer.

Signature

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_lrnCreateDlLayerLrnCreateDlLayerLrncreate_dl_layer_lrn creates a local response normalization layer which performs normalization over a local window and whose handle is returned in DLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNdllayer_lrn. Currently, for NormRegionNormRegionNormRegionnormRegionnorm_region only 'across_channels'"across_channels""across_channels""across_channels""across_channels" can be set, 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 LocalSizeLocalSizeLocalSizelocalSizelocal_size, is the total number of channels, AlphaAlphaAlphaalphaalpha is the scaling parameter (used as a normalization constant), BetaBetaBetabetabeta is the exponent used as a contrast constant, and KKKkk is a constant summand, which is used to avoid any singularities.

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

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

The following generic parameters GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and the corresponding values GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are supported:

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

Determines whether apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelapply_dl_model will include the output of this layer in the dictionary DLResultBatchDLResultBatchDLResultBatchDLResultBatchdlresult_batch even without specifying this layer in OutputsOutputsOutputsoutputsoutputs ('true'"true""true""true""true") or not ('false'"false""false""false""false").

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

Certain parameters of layers created using this operator create_dl_layer_lrncreate_dl_layer_lrnCreateDlLayerLrnCreateDlLayerLrncreate_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_paramSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and which ones can be retrieved using get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param or get_dl_layer_paramget_dl_layer_paramGetDlLayerParamGetDlLayerParamget_dl_layer_param. Note, the operators set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param require a model created by create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelcreate_dl_model.

Layer Parameters set get
'alpha'"alpha""alpha""alpha""alpha" (AlphaAlphaAlphaalphaalpha) x
'beta'"beta""beta""beta""beta" (BetaBetaBetabetabeta) x
'input_layer'"input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input) x
'k'"k""k""k""k" (KKKkk) x
'local_size'"local_size""local_size""local_size""local_size" (LocalSizeLocalSizeLocalSizelocalSizelocal_size) x
'name'"name""name""name""name" (LayerNameLayerNameLayerNamelayerNamelayer_name) x x
'norm_region'"norm_region""norm_region""norm_region""norm_region" (NormRegionNormRegionNormRegionnormRegionnorm_region) x
'output_layer'"output_layer""output_layer""output_layer""output_layer" (DLLayerLRNDLLayerLRNDLLayerLRNDLLayerLRNdllayer_lrn) x
'shape'"shape""shape""shape""shape" x
'type'"type""type""type""type" x
Generic Layer Parameters set get
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output" x x
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params" x

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

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

Feeding layer.

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

Name of the output layer.

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

Size of the local window.

Default: 5

AlphaAlphaAlphaalphaalpha (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Scaling factor in the LRN formula.

Default: 0.0001

BetaBetaBetabetabeta (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Exponent in the LRN formula.

Default: 0.75

KKKkk (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Constant summand in the LRN formula.

Default: 1.0

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

Normalization dimension.

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

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

Generic input parameter names.

Default: []

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

GenParamValueGenParamValueGenParamValuegenParamValuegen_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: []

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

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

LRN layer.

Module

Deep Learning Professional