create_dl_layer_lrn T_create_dl_layer_lrn CreateDlLayerLrn CreateDlLayerLrn create_dl_layer_lrn (Operator)
Name
create_dl_layer_lrn T_create_dl_layer_lrn CreateDlLayerLrn CreateDlLayerLrn create_dl_layer_lrn
— Create a LRN layer.
Signature
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_lrn create_dl_layer_lrn CreateDlLayerLrn CreateDlLayerLrn create_dl_layer_lrn
creates a local response
normalization layer which performs normalization
over a local window and whose handle is returned in DLLayerLRN DLLayerLRN DLLayerLRN DLLayerLRN dllayer_lrn
.
Currently, for NormRegion NormRegion NormRegion normRegion norm_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 LocalSize LocalSize LocalSize localSize local_size
,
is the total number of channels,
Alpha Alpha Alpha alpha alpha
is the scaling parameter (used as a normalization constant),
Beta Beta Beta beta beta
is the exponent used as a contrast constant, and
K K K k k
is a constant summand, which is used to avoid any singularities.
The parameter DLLayerInput DLLayerInput DLLayerInput DLLayerInput dllayer_input
determines the feeding input layer and
expects the layer handle as value.
The parameter LayerName LayerName LayerName layerName layer_name
sets an individual layer name.
Note that if creating a model using create_dl_model create_dl_model CreateDlModel CreateDlModel create_dl_model
each layer of
the created network must have a unique name.
The following generic parameters GenParamName GenParamName GenParamName genParamName gen_param_name
and the corresponding
values GenParamValue GenParamValue GenParamValue genParamValue gen_param_value
are supported:
'is_inference_output' "is_inference_output" "is_inference_output" "is_inference_output" "is_inference_output" :
Determines whether apply_dl_model apply_dl_model ApplyDlModel ApplyDlModel apply_dl_model
will include the output of this
layer in the dictionary DLResultBatch DLResultBatch DLResultBatch DLResultBatch dlresult_batch
even without specifying this
layer in Outputs Outputs Outputs outputs outputs
('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_lrn create_dl_layer_lrn CreateDlLayerLrn CreateDlLayerLrn create_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_param set_dl_model_layer_param SetDlModelLayerParam SetDlModelLayerParam set_dl_model_layer_param
and which ones can be retrieved
using get_dl_model_layer_param get_dl_model_layer_param GetDlModelLayerParam GetDlModelLayerParam get_dl_model_layer_param
or get_dl_layer_param get_dl_layer_param GetDlLayerParam GetDlLayerParam get_dl_layer_param
. Note, the
operators set_dl_model_layer_param set_dl_model_layer_param SetDlModelLayerParam SetDlModelLayerParam set_dl_model_layer_param
and get_dl_model_layer_param get_dl_model_layer_param GetDlModelLayerParam GetDlModelLayerParam get_dl_model_layer_param
require a model created by create_dl_model create_dl_model CreateDlModel CreateDlModel create_dl_model
.
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
DLLayerInput DLLayerInput DLLayerInput DLLayerInput dllayer_input
(input_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Feeding layer.
LayerName LayerName LayerName layerName layer_name
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Name of the output layer.
LocalSize LocalSize LocalSize localSize local_size
(input_control) number →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Size of the local window.
Default:
5
Alpha Alpha Alpha alpha alpha
(input_control) number →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Scaling factor in the LRN formula.
Default:
0.0001
Beta Beta Beta beta beta
(input_control) number →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Exponent in the LRN formula.
Default:
0.75
K K K k k
(input_control) number →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Constant summand in the LRN formula.
Default:
1.0
NormRegion NormRegion NormRegion normRegion norm_region
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Normalization dimension.
Default:
'across_channels'
"across_channels"
"across_channels"
"across_channels"
"across_channels"
GenParamName GenParamName GenParamName genParamName gen_param_name
(input_control) attribute.name(-array) →
HTuple MaybeSequence[str] HTuple Htuple (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"
GenParamValue GenParamValue GenParamValue genParamValue gen_param_value
(input_control) attribute.value(-array) →
HTuple MaybeSequence[Union[int, float, str]] HTuple Htuple (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"
DLLayerLRN DLLayerLRN DLLayerLRN DLLayerLRN dllayer_lrn
(output_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
LRN layer.
Module
Deep Learning Training