Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / api / C / deconvolution.h
1 /*
2 // Copyright (c) 2016 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
18 #ifndef DECONVOLUTION_H
19 #define DECONVOLUTION_H
20
21 #include "cldnn.h"
22 /// @addtogroup c_api C API
23 /// @{
24 /// @addtogroup c_topology Network Topology
25 /// @{
26 /// @addtogroup c_primitives Primitives
27 /// @{
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /// @brief Performs transposed convolution.
34 /// Also supports built-in Relu @CLDNN_PRIMITIVE_DESC{activation} available by setting it in arguments.
35 /// @details Deconvolution is similar to convolution layer with the weights flipped on the axis and stride and input padding parameters used in opposite sense as in convolution.
36 CLDNN_BEGIN_PRIMITIVE_DESC(deconvolution)
37 /// @brief Defines a shift, relative to (0,0) position of the input buffer, where (0,0) point of the deconvolution window should start calculations.
38 cldnn_tensor input_offset;
39 /// @brief Defines the spatial dimensions of stride of adjacent elements in input buffer.
40 cldnn_tensor stride;
41 /// @brief Enables Relu activation.
42 uint32_t with_activation;
43 /// @brief Relu activation slope.
44 float activation_negative_slope;
45 /// @brief On how many cards split the computation to.
46 uint32_t split;
47 /// @brief Indicates that the primitive has user-defined output size (non-zero value).
48 uint32_t with_output_size;
49 /// @brief User-defined output data size of the primitive (w/o padding).
50 cldnn_tensor output_size;
51 /// @brief Array of primitive ids containing weights data. Size of array should be equivalent to @p split.
52 cldnn_primitive_id_arr weights;
53 /// @brief Array of primitive ids containing bias data. Size of array should be equivalent to @p split or should be empty (if not using bias).
54 cldnn_primitive_id_arr bias;
55 /// @brief Indicates that deconvolution is used for convolution backward computation (convolution_grad_input)
56 uint32_t gradient;
57 /// @brief Number of feature groups (grouped deconvolution). If more than 1 then weights/bias count needs to be 1.
58 uint32_t groups;
59 CLDNN_END_PRIMITIVE_DESC(deconvolution)
60
61 CLDNN_DECLARE_PRIMITIVE_TYPE_ID(deconvolution);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 /// @}
68 /// @}
69 /// @}
70 #endif /* DECONVOLUTION_H */
71