create_dl_layer_loss_huber T_create_dl_layer_loss_huber CreateDlLayerLossHuber CreateDlLayerLossHuber create_dl_layer_loss_huber (Operator)
create_dl_layer_loss_huber T_create_dl_layer_loss_huber CreateDlLayerLossHuber CreateDlLayerLossHuber create_dl_layer_loss_huber
— Create a Huber loss layer.
Signature
void CreateDlLayerLossHuber (const HTuple& DLLayerInput , const HTuple& DLLayerTarget , const HTuple& DLLayerWeights , const HTuple& DLLayerNormalization , const HTuple& LayerName , const HTuple& LossWeight , const HTuple& Beta , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* DLLayerLossHuber )
HDlLayer HDlLayer ::CreateDlLayerLossHuber (const HDlLayer& DLLayerTarget , const HDlLayer& DLLayerWeights , const HDlLayer& DLLayerNormalization , const HString& LayerName , double LossWeight , double Beta , const HTuple& GenParamName , const HTuple& GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerLossHuber (const HDlLayer& DLLayerTarget , const HDlLayer& DLLayerWeights , const HDlLayer& DLLayerNormalization , const HString& LayerName , double LossWeight , double Beta , const HString& GenParamName , const HString& GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerLossHuber (const HDlLayer& DLLayerTarget , const HDlLayer& DLLayerWeights , const HDlLayer& DLLayerNormalization , const char* LayerName , double LossWeight , double Beta , const char* GenParamName , const char* GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerLossHuber (const HDlLayer& DLLayerTarget , const HDlLayer& DLLayerWeights , const HDlLayer& DLLayerNormalization , const wchar_t* LayerName , double LossWeight , double Beta , const wchar_t* GenParamName , const wchar_t* GenParamValue ) const
(
Windows only)
static void HOperatorSet .CreateDlLayerLossHuber (HTuple DLLayerInput , HTuple DLLayerTarget , HTuple DLLayerWeights , HTuple DLLayerNormalization , HTuple layerName , HTuple lossWeight , HTuple beta , HTuple genParamName , HTuple genParamValue , out HTuple DLLayerLossHuber )
HDlLayer HDlLayer .CreateDlLayerLossHuber (HDlLayer DLLayerTarget , HDlLayer DLLayerWeights , HDlLayer DLLayerNormalization , string layerName , double lossWeight , double beta , HTuple genParamName , HTuple genParamValue )
HDlLayer HDlLayer .CreateDlLayerLossHuber (HDlLayer DLLayerTarget , HDlLayer DLLayerWeights , HDlLayer DLLayerNormalization , string layerName , double lossWeight , double beta , string genParamName , string genParamValue )
def create_dl_layer_loss_huber (dllayer_input : HHandle, dllayer_target : HHandle, dllayer_weights : HHandle, dllayer_normalization : HHandle, layer_name : str, loss_weight : float, beta : float, gen_param_name : MaybeSequence[str], gen_param_value : MaybeSequence[Union[int, float, str]]) -> HHandle
Description
The operator create_dl_layer_loss_huber create_dl_layer_loss_huber CreateDlLayerLossHuber CreateDlLayerLossHuber create_dl_layer_loss_huber
creates a Huber loss layer
whose handle is returned in DLLayerLossHuber DLLayerLossHuber DLLayerLossHuber DLLayerLossHuber dllayer_loss_huber
.
The Huber loss is defined by
This layer expects multiple layers as input:
The underlying data tensors are assumed to be of the same shape with
a total number of
elements.
The parameter DLLayerNormalization DLLayerNormalization DLLayerNormalization DLLayerNormalization dllayer_normalization
can be used to determine the
normalization factor
. If DLLayerNormalization DLLayerNormalization DLLayerNormalization DLLayerNormalization dllayer_normalization
is set to an
empty tuple, the sum over all weights is used for the normalization
.
The parameter LossWeight LossWeight LossWeight lossWeight loss_weight
determines the scalar weight factor
.
The parameter Beta Beta Beta beta beta
sets the value for
in the
formula.
If Beta Beta Beta beta beta
is set to 0 , the Huber loss is equal to an L1-loss.
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_loss_huber create_dl_layer_loss_huber CreateDlLayerLossHuber CreateDlLayerLossHuber create_dl_layer_loss_huber
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 )
Input layer.
DLLayerTarget DLLayerTarget DLLayerTarget DLLayerTarget dllayer_target
(input_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Target layer.
DLLayerWeights DLLayerWeights DLLayerWeights DLLayerWeights dllayer_weights
(input_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Weights layer.
DLLayerNormalization DLLayerNormalization DLLayerNormalization DLLayerNormalization dllayer_normalization
(input_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Normalization layer.
Default:
[]
LayerName LayerName LayerName layerName layer_name
(input_control) string →
HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Name of the output layer.
LossWeight LossWeight LossWeight lossWeight loss_weight
(input_control) number →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Scalar weight factor.
Default:
1.0
Beta Beta Beta beta beta
(input_control) number →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Beta value in the loss-defining formula.
Default:
1.1
Restriction:
Beta >= 0
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"
DLLayerLossHuber DLLayerLossHuber DLLayerLossHuber DLLayerLossHuber dllayer_loss_huber
(output_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Huber loss layer.
Module
Deep Learning Professional