create_dl_layer_zoom_to_layer_sizeT_create_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizecreate_dl_layer_zoom_to_layer_size (Operator)

Name

create_dl_layer_zoom_to_layer_sizeT_create_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizecreate_dl_layer_zoom_to_layer_size — Create a zoom layer using the output size of a reference layer.

Signature

create_dl_layer_zoom_to_layer_size( : : DLLayerInput, DLLayerReference, LayerName, Interpolation, AlignCorners, GenParamName, GenParamValue : DLLayerZoom)

Herror T_create_dl_layer_zoom_to_layer_size(const Htuple DLLayerInput, const Htuple DLLayerReference, const Htuple LayerName, const Htuple Interpolation, const Htuple AlignCorners, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerZoom)

void CreateDlLayerZoomToLayerSize(const HTuple& DLLayerInput, const HTuple& DLLayerReference, const HTuple& LayerName, const HTuple& Interpolation, const HTuple& AlignCorners, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerZoom)

HDlLayer HDlLayer::CreateDlLayerZoomToLayerSize(const HDlLayer& DLLayerReference, const HString& LayerName, const HString& Interpolation, const HString& AlignCorners, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerZoomToLayerSize(const HDlLayer& DLLayerReference, const HString& LayerName, const HString& Interpolation, const HString& AlignCorners, const HString& GenParamName, const HString& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerZoomToLayerSize(const HDlLayer& DLLayerReference, const char* LayerName, const char* Interpolation, const char* AlignCorners, const char* GenParamName, const char* GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerZoomToLayerSize(const HDlLayer& DLLayerReference, const wchar_t* LayerName, const wchar_t* Interpolation, const wchar_t* AlignCorners, const wchar_t* GenParamName, const wchar_t* GenParamValue) const   (Windows only)

static void HOperatorSet.CreateDlLayerZoomToLayerSize(HTuple DLLayerInput, HTuple DLLayerReference, HTuple layerName, HTuple interpolation, HTuple alignCorners, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerZoom)

HDlLayer HDlLayer.CreateDlLayerZoomToLayerSize(HDlLayer DLLayerReference, string layerName, string interpolation, string alignCorners, HTuple genParamName, HTuple genParamValue)

HDlLayer HDlLayer.CreateDlLayerZoomToLayerSize(HDlLayer DLLayerReference, string layerName, string interpolation, string alignCorners, string genParamName, string genParamValue)

def create_dl_layer_zoom_to_layer_size(dllayer_input: HHandle, dllayer_reference: HHandle, layer_name: str, interpolation: str, align_corners: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

The operator create_dl_layer_zoom_to_layer_sizecreate_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizecreate_dl_layer_zoom_to_layer_size creates a zoom layer using the output size of a reference layer and returns the layer handle in DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom.

The parameter DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input determines the feeding input layer and expects the layer handle as value.

The parameter DLLayerReferenceDLLayerReferenceDLLayerReferenceDLLayerReferenceDLLayerReferencedllayer_reference is used to define the output size of the zoom layer DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom: the size is adapted to the output size of DLLayerReferenceDLLayerReferenceDLLayerReferenceDLLayerReferenceDLLayerReferencedllayer_reference.

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 InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation defines the interpolation mode. Currently only the mode 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" is supported.

The parameter AlignCornersAlignCornersAlignCornersAlignCornersalignCornersalign_corners defines how coordinates are transformed from the output to the input image:

'true'"true""true""true""true""true":

The transformation is applied in the HALCON Non-Standard Cartesian coordinate system (edge-centered, with the origin in the upper left corner, see chapter Transformations / 2D Transformations). Using the axis as an example, this leads to:

'false'"false""false""false""false""false":

The transformation is applied in the HALCON standard coordinate system (pixel centered, with the origin in the center of the upper left pixel, see chapter Transformations / 2D Transformations). Using the axis as an example, this leads to:

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"

'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params":

Number of trainable parameters (weights and biases) of the layer.

Certain parameters of layers created using this operator create_dl_layer_zoom_to_layer_sizecreate_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizecreate_dl_layer_zoom_to_layer_size 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
'align_corners'"align_corners""align_corners""align_corners""align_corners""align_corners" (AlignCornersAlignCornersAlignCornersAlignCornersalignCornersalign_corners)
'input_layer'"input_layer""input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input)
'interpolation_mode'"interpolation_mode""interpolation_mode""interpolation_mode""interpolation_mode""interpolation_mode" (InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation)
'name'"name""name""name""name""name" (LayerNameLayerNameLayerNameLayerNamelayerNamelayer_name)
'output_layer'"output_layer""output_layer""output_layer""output_layer""output_layer" (DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom)
'scale_params'"scale_params""scale_params""scale_params""scale_params""scale_params" (DLLayerReferenceDLLayerReferenceDLLayerReferenceDLLayerReferenceDLLayerReferencedllayer_reference)
'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)

Feeding layer.

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

Reference layer to define the output size.

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

Name of the output layer.

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

Mode of interpolation.

Default value: 'bilinear' "bilinear" "bilinear" "bilinear" "bilinear" "bilinear"

List of values: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear"

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

Type of coordinate transformation between output/input images.

Default value: 'false' "false" "false" "false" "false" "false"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

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", 'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params"

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"

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

Zoom layer.

Alternatives

create_dl_layer_zoom_sizecreate_dl_layer_zoom_sizeCreateDlLayerZoomSizeCreateDlLayerZoomSizeCreateDlLayerZoomSizecreate_dl_layer_zoom_size, create_dl_layer_zoom_factorcreate_dl_layer_zoom_factorCreateDlLayerZoomFactorCreateDlLayerZoomFactorCreateDlLayerZoomFactorcreate_dl_layer_zoom_factor

Module

Deep Learning Training