create_dl_layer_loss_huberT_create_dl_layer_loss_huberCreateDlLayerLossHuberCreateDlLayerLossHubercreate_dl_layer_loss_huber (Operator)

Name

create_dl_layer_loss_huberT_create_dl_layer_loss_huberCreateDlLayerLossHuberCreateDlLayerLossHubercreate_dl_layer_loss_huber — Create a Huber loss layer.

Signature

create_dl_layer_loss_huber( : : DLLayerInput, DLLayerTarget, DLLayerWeights, DLLayerNormalization, LayerName, LossWeight, Beta, GenParamName, GenParamValue : DLLayerLossHuber)

Herror T_create_dl_layer_loss_huber(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)

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_hubercreate_dl_layer_loss_huberCreateDlLayerLossHuberCreateDlLayerLossHuberCreateDlLayerLossHubercreate_dl_layer_loss_huber creates a Huber loss layer whose handle is returned in DLLayerLossHuberDLLayerLossHuberDLLayerLossHuberDLLayerLossHuberDLLayerLossHuberdllayer_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 DLLayerNormalizationDLLayerNormalizationDLLayerNormalizationDLLayerNormalizationDLLayerNormalizationdllayer_normalization can be used to determine the normalization factor . If DLLayerNormalizationDLLayerNormalizationDLLayerNormalizationDLLayerNormalizationDLLayerNormalizationdllayer_normalization is set to an empty tuple, the sum over all weights is used for the normalization .

The parameter LossWeightLossWeightLossWeightLossWeightlossWeightloss_weight determines the scalar weight factor .

The parameter BetaBetaBetaBetabetabeta sets the value for in the formula. If BetaBetaBetaBetabetabeta is set to 0, the Huber loss is equal to an L1-loss.

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 a 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"

Certain parameters of layers created using this operator create_dl_layer_loss_hubercreate_dl_layer_loss_huberCreateDlLayerLossHuberCreateDlLayerLossHuberCreateDlLayerLossHubercreate_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_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
'beta'"beta""beta""beta""beta""beta" (BetaBetaBetaBetabetabeta)
'input_layer'"input_layer""input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input, DLLayerTargetDLLayerTargetDLLayerTargetDLLayerTargetDLLayerTargetdllayer_target, DLLayerWeightsDLLayerWeightsDLLayerWeightsDLLayerWeightsDLLayerWeightsdllayer_weights, and/or DLLayerNormalizationDLLayerNormalizationDLLayerNormalizationDLLayerNormalizationDLLayerNormalizationdllayer_normalization)
'loss_weight'"loss_weight""loss_weight""loss_weight""loss_weight""loss_weight" (LossWeightLossWeightLossWeightLossWeightlossWeightloss_weight)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'output_layer'"output_layer""output_layer""output_layer""output_layer""output_layer" (DLLayerLossHuberDLLayerLossHuberDLLayerLossHuberDLLayerLossHuberDLLayerLossHuberdllayer_loss_huber)
'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)

Input layer.

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

Target layer.

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

Weights layer.

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

Normalization layer.

Default: []

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

Name of the output layer.

LossWeightLossWeightLossWeightLossWeightlossWeightloss_weight (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Scalar weight factor.

Default: 1.0

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

Beta value in the loss-defining formula.

Default: 1.1

Restriction: Beta >= 0

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_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""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: []

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

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

Huber loss layer.

Module

Deep Learning Training