create_dl_layer_activationT_create_dl_layer_activationCreateDlLayerActivationCreateDlLayerActivationcreate_dl_layer_activation (Operator)

Name

create_dl_layer_activationT_create_dl_layer_activationCreateDlLayerActivationCreateDlLayerActivationcreate_dl_layer_activation — Create an activation layer.

Signature

create_dl_layer_activation( : : DLLayerInput, LayerName, ActivationType, GenParamName, GenParamValue : DLLayerActivation)

Herror T_create_dl_layer_activation(const Htuple DLLayerInput, const Htuple LayerName, const Htuple ActivationType, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerActivation)

void CreateDlLayerActivation(const HTuple& DLLayerInput, const HTuple& LayerName, const HTuple& ActivationType, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerActivation)

HDlLayer HDlLayer::CreateDlLayerActivation(const HString& LayerName, const HString& ActivationType, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerActivation(const HString& LayerName, const HString& ActivationType, const HString& GenParamName, const HString& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerActivation(const char* LayerName, const char* ActivationType, const char* GenParamName, const char* GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerActivation(const wchar_t* LayerName, const wchar_t* ActivationType, const wchar_t* GenParamName, const wchar_t* GenParamValue) const   (Windows only)

static void HOperatorSet.CreateDlLayerActivation(HTuple DLLayerInput, HTuple layerName, HTuple activationType, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerActivation)

HDlLayer HDlLayer.CreateDlLayerActivation(string layerName, string activationType, HTuple genParamName, HTuple genParamValue)

HDlLayer HDlLayer.CreateDlLayerActivation(string layerName, string activationType, string genParamName, string genParamValue)

def create_dl_layer_activation(dllayer_input: HHandle, layer_name: str, activation_type: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

The operator create_dl_layer_activationcreate_dl_layer_activationCreateDlLayerActivationCreateDlLayerActivationCreateDlLayerActivationcreate_dl_layer_activation creates an activation layer whose handle is returned in DLLayerActivationDLLayerActivationDLLayerActivationDLLayerActivationDLLayerActivationdllayer_activation.

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 a unique name.

The parameter ActivationTypeActivationTypeActivationTypeActivationTypeactivationTypeactivation_type sets the type of the activation. Supported activation types are:

'relu'"relu""relu""relu""relu""relu":

Rectified linear unit (ReLU) activation. By setting a specific ReLU parameter, another type can be specified instead of the standard ReLU:

'sigmoid'"sigmoid""sigmoid""sigmoid""sigmoid""sigmoid":

Sigmoid activation, which is defined as follows.

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"

'upper_bound'"upper_bound""upper_bound""upper_bound""upper_bound""upper_bound":

Float value defining an upper bound for a rectified linear unit. If the activation layer is part of a model which has been created using create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelCreateDlModelcreate_dl_model, the upper bound can be unset. To do so, use set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and set an empty tuple for 'upper_bound'"upper_bound""upper_bound""upper_bound""upper_bound""upper_bound".

Default: []

'leaky_relu_alpha'"leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha":

Float value defining the alpha parameter of a leaky ReLU.

Restriction: The value of 'leaky_relu_alpha'"leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha" must be positive or zero.

Default: 0.0

Certain parameters of layers created using this operator create_dl_layer_activationcreate_dl_layer_activationCreateDlLayerActivationCreateDlLayerActivationCreateDlLayerActivationcreate_dl_layer_activation 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
'activation_type'"activation_type""activation_type""activation_type""activation_type""activation_type" (ActivationTypeActivationTypeActivationTypeActivationTypeactivationTypeactivation_type)
'input_layer'"input_layer""input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'output_layer'"output_layer""output_layer""output_layer""output_layer""output_layer" (DLLayerActivationDLLayerActivationDLLayerActivationDLLayerActivationDLLayerActivationdllayer_activation)
'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"
'leaky_relu_alpha'"leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha"
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params"
'upper_bound'"upper_bound""upper_bound""upper_bound""upper_bound""upper_bound"

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 output layer.

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

Activation type.

Default value: 'relu' "relu" "relu" "relu" "relu" "relu"

List of values: 'relu'"relu""relu""relu""relu""relu", 'sigmoid'"sigmoid""sigmoid""sigmoid""sigmoid""sigmoid"

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", 'leaky_relu_alpha'"leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha""leaky_relu_alpha", 'upper_bound'"upper_bound""upper_bound""upper_bound""upper_bound""upper_bound"

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"

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

Activation layer.

Module

Deep Learning Training