create_dl_layer_softmax T_create_dl_layer_softmax CreateDlLayerSoftmax CreateDlLayerSoftmax create_dl_layer_softmax (Operator)
Name
create_dl_layer_softmax T_create_dl_layer_softmax CreateDlLayerSoftmax CreateDlLayerSoftmax create_dl_layer_softmax
— Create a softmax layer.
Signature
void CreateDlLayerSoftmax (const HTuple& DLLayerInput , const HTuple& LayerName , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* DLLayerSoftMax )
HDlLayer HDlLayer ::CreateDlLayerSoftmax (const HString& LayerName , const HTuple& GenParamName , const HTuple& GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerSoftmax (const HString& LayerName , const HString& GenParamName , const HString& GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerSoftmax (const char* LayerName , const char* GenParamName , const char* GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerSoftmax (const wchar_t* LayerName , const wchar_t* GenParamName , const wchar_t* GenParamValue ) const
(
Windows only)
Description
The operator create_dl_layer_softmax create_dl_layer_softmax CreateDlLayerSoftmax CreateDlLayerSoftmax create_dl_layer_softmax
creates a softmax layer whose
handle is returned in DLLayerSoftMax DLLayerSoftMax DLLayerSoftMax DLLayerSoftMax dllayer_soft_max
.
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 softmax layer applies the softmax function which is defined for each input
as follows:
where
is the number of inputs. During training, the result of the
softmax function is transformed by a logarithm
function, such that the values are suitable as input to e.g., a cross
entropy loss layer.
This behavior can be changed by setting the generic parameter
'output_mode' "output_mode" "output_mode" "output_mode" "output_mode" , see below.
The following generic parameters GenParamName GenParamName GenParamName genParamName gen_param_name
and the corresponding
values GenParamValue GenParamValue GenParamValue genParamValue gen_param_value
are supported:
'output_mode' "output_mode" "output_mode" "output_mode" "output_mode" :
This parameter determines if and in which case the output is transformed
by a logarithm function:
'default' "default" "default" "default" "default" : During inference, the result of the softmax
function is returned as output while during training, the softmax is
further transformed by a logarithm function.
'no_log_training' "no_log_training" "no_log_training" "no_log_training" "no_log_training" : During training the result of the
softmax function is not transformed by a logarithm function.
'log_inference' "log_inference" "log_inference" "log_inference" "log_inference" : The logarithm of the softmax is
calculated during inference in the same way as during training.
Default:
'default' "default" "default" "default" "default" .
'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_softmax create_dl_layer_softmax CreateDlLayerSoftmax CreateDlLayerSoftmax create_dl_layer_softmax
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
'output_mode' "output_mode" "output_mode" "output_mode" "output_mode"
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.
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" , 'output_mode' "output_mode" "output_mode" "output_mode" "output_mode"
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:
'default' "default" "default" "default" "default" , 'no_log_training' "no_log_training" "no_log_training" "no_log_training" "no_log_training" , 'log_inference' "log_inference" "log_inference" "log_inference" "log_inference" , 'true' "true" "true" "true" "true" , 'false' "false" "false" "false" "false"
DLLayerSoftMax DLLayerSoftMax DLLayerSoftMax DLLayerSoftMax dllayer_soft_max
(output_control) dl_layer →
HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Softmax layer.
Module
Deep Learning Professional