Compute Library
 21.05
LayerDescriptors.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef ARM_COMPUTE_LAYER_DESCRIPTORS_H
25 #define ARM_COMPUTE_LAYER_DESCRIPTORS_H
26 
27 #include "arm_compute/core/Types.h"
29 
30 namespace arm_compute
31 {
32 namespace graph
33 {
34 namespace descriptors
35 {
36 /** Concatenate layer descriptor */
38 {
39  /** Default constructor */
42  {
43  }
44 
45  /** Constructor concatenate layer descriptor
46  *
47  * @param[in] axis Axis.
48  */
50  : axis(axis), output_qinfo()
51  {
52  }
53 
54  /** Constructor concatenate layer descriptor
55  *
56  * @param[in] axis Axis.
57  * @param[in] output_qinfo Output quantization info.
58  */
61  {
62  }
63 
64  const DataLayoutDimension axis; /**< Concatenation Axis */
65  const QuantizationInfo output_qinfo; /**< Output quantizazion info */
66 };
67 
68 /** Elementwise layer descriptor */
70 {
71  /** Constructor
72  *
73  * @param[in] op Element-wise operation to perform
74  * @param[in] out_quant_info (Optional) Output quantization information. Defaults to empty @ref QuantizationInfo
75  * @param[in] c_policy (Optional) Convert policy used for the operation. Defaults to @ref ConvertPolicy::SATURATE
76  * @param[in] r_policy (Optional) Rounding policy used for the operation. Defaults to @ref RoundingPolicy::TO_ZERO
77  * @param[in] fused_activation (Optional) Fused activation information. Defaults to empty (identity) @ref ActivationLayerInfo
78  */
82  {
83  }
84 
85  EltwiseOperation op; /**< Element-wise operation to perform */
86  QuantizationInfo out_quant_info; /**< Output quantization information */
87  ConvertPolicy c_policy; /**< Convert policy */
88  RoundingPolicy r_policy; /**< Rounding policy */
89  ActivationLayerInfo fused_activation; /**< Fused activation info */
90 };
91 
92 /** Unary Elementwise layer descriptor */
94 {
95  /** Constructor
96  *
97  * @param[in] op Unary element-wise operation to perform
98  * @param[in] out_quant_info (Optional) Output quantization information. Defaults to empty @ref QuantizationInfo
99  * @param[in] c_policy (Optional) Convert policy used for the operation. Defaults to @ref ConvertPolicy::SATURATE
100  * @param[in] r_policy (Optional) Rounding policy used for the operation. Defaults to @ref RoundingPolicy::TO_ZERO
101  * @param[in] fused_activation (Optional) Fused activation information. Defaults to empty (identity) @ref ActivationLayerInfo
102  */
107  {
108  }
109 
110  UnaryEltwiseOperation op; /**< Unary element-wise operation to perform */
111  QuantizationInfo out_quant_info; /**< Output quantization information */
112  ConvertPolicy c_policy; /**< Convert policy */
113  RoundingPolicy r_policy; /**< Rounding policy */
114  ActivationLayerInfo fused_activation; /**< Fused activation info */
115 };
116 
117 /** Deconvolution layer descriptor */
119 {
120  /** Constructor
121  *
122  * @param[in] info Dedonvolution layer attributes
123  * @param[in] out_quant_info (Optional) Output quantization infomation
124  */
127  {
128  }
129 
130  PadStrideInfo info; /**< Padding and stride information */
131  QuantizationInfo out_quant_info; /**< Output quantization information */
132 };
133 } // namespace descriptor
134 } // namespace graph
135 } // namespace arm_compute
136 #endif /* ARM_COMPUTE_LAYER_DESCRIPTORS_H */
EltwiseLayerDescriptor(EltwiseOperation op, QuantizationInfo out_quant_info=QuantizationInfo(), ConvertPolicy c_policy=ConvertPolicy::SATURATE, RoundingPolicy r_policy=RoundingPolicy::TO_ZERO, ActivationLayerInfo fused_activation=ActivationLayerInfo())
Constructor.
EltwiseOperation
Supported Element-wise operations.
Definition: Types.h:108
DataLayoutDimension
[DataLayout enum definition]
Definition: Types.h:123
const QuantizationInfo output_qinfo
Output quantizazion info.
ActivationLayerInfo fused_activation
Fused activation info.
Activation Layer Information class.
Definition: Types.h:1478
Copyright (c) 2017-2021 Arm Limited.
PadStrideInfo info
Padding and stride information.
DeconvolutionLayerDescriptor(PadStrideInfo info, QuantizationInfo out_quant_info=QuantizationInfo())
Constructor.
QuantizationInfo out_quant_info
Output quantization information.
Quantization information.
ActivationLayerInfo fused_activation
Fused activation info.
RoundingPolicy
Rounding method.
Definition: Rounding.h:30
UnaryEltwiseOperation op
Unary element-wise operation to perform.
Padding and stride information class.
Definition: Types.h:650
ConcatLayerDescriptor(DataLayoutDimension axis)
Constructor concatenate layer descriptor.
UnaryEltwiseLayerDescriptor(UnaryEltwiseOperation op, QuantizationInfo out_quant_info=QuantizationInfo(), ConvertPolicy c_policy=ConvertPolicy::SATURATE, RoundingPolicy r_policy=RoundingPolicy::TO_ZERO, ActivationLayerInfo fused_activation=ActivationLayerInfo())
Constructor.
const DataLayoutDimension axis
Concatenation Axis.
QuantizationInfo out_quant_info
Output quantization information.
Truncates the least significant values that are lost in operations.
EltwiseOperation op
Element-wise operation to perform.
QuantizationInfo out_quant_info
Output quantization information.
ConvertPolicy
Policy to handle overflow.
Definition: Types.h:385
ConcatLayerDescriptor(DataLayoutDimension axis, QuantizationInfo output_qinfo)
Constructor concatenate layer descriptor.
UnaryEltwiseOperation
Supported Unary Element-wise operations.
Definition: Types.h:118