24 #ifndef __ARM_COMPUTE_TYPE_PRINTER_H__ 25 #define __ARM_COMPUTE_TYPE_PRINTER_H__ 27 #ifdef ARM_COMPUTE_OPENCL_ENABLED 95 ::std::ostream &operator<<(::std::ostream &os, const std::vector<T> &
args)
97 const size_t max_print_size = 5
U;
102 for(i = 0; i <
args.size(); ++i)
104 if(i == max_print_size)
132 template <
typename T>
135 std::stringstream
str;
167 os <<
"Eltwise_PRelu";
186 std::stringstream
str;
197 template <
typename T>
198 inline ::std::ostream &operator<<(::std::ostream &os, const experimental::IPostOp<T> &post_op)
201 os << post_op.type() <<
",";
202 os <<
"prev_dst_pos=" << post_op.prev_dst_pos() <<
",";
203 switch(post_op.type())
207 const auto _post_op = utils::cast::polymorphic_downcast<const experimental::PostOpAct<T> *>(&post_op);
208 os <<
"act_info=" << &(_post_op->_act_info);
213 const auto _post_op = utils::cast::polymorphic_downcast<const experimental::PostOpEltwiseAdd<T> *>(&post_op);
214 os <<
"convert_policy=" << _post_op->_policy;
219 const auto _post_op = utils::cast::polymorphic_downcast<const experimental::PostOpEltwisePRelu<T> *>(&post_op);
220 os <<
"convert_policy=" << _post_op->_policy;
238 template <
typename T>
241 std::stringstream
str;
252 template <
typename T>
253 inline ::std::ostream &operator<<(::std::ostream &os, const experimental::PostOpList<T> &
post_ops)
256 for(
const auto &post_op :
post_ops.get_list())
258 os << *post_op <<
",";
269 template <
typename T>
272 std::stringstream
str;
285 template <
typename T>
286 inline ::std::ostream &operator<<(::std::ostream &os, const Dimensions<T> &dimensions)
288 if(dimensions.num_dimensions() > 0)
292 for(
unsigned int d = 1; d < dimensions.num_dimensions(); ++d)
294 os <<
"," << dimensions[d];
310 switch(rounding_policy)
316 os <<
"TO_NEAREST_UP";
319 os <<
"TO_NEAREST_EVEN";
364 std::stringstream
str;
378 os <<
"( m=" << gemm_info.
m;
379 os <<
" n=" << gemm_info.
n;
380 os <<
" k=" << gemm_info.
k;
387 os <<
" a_offset=" << gemm_info.
a_offset;
388 os <<
" b_offset=" << gemm_info.
b_offset;
389 os <<
"post_ops=" << gemm_info.
post_ops;
403 os <<
"( m0=" << (
unsigned int)gemm_info.
m0 <<
" k0=" << gemm_info.
k0 <<
" v0=" << gemm_info.
v0 <<
" trans=" << gemm_info.
transpose <<
" inter=" << gemm_info.
interleave <<
"})";
416 os <<
"( n0=" << (
unsigned int)gemm_info.
n0 <<
" k0=" << gemm_info.
k0 <<
" h0=" << gemm_info.
h0 <<
" trans=" << gemm_info.
transpose <<
" inter=" << gemm_info.
interleave <<
" exp_img=" <<
429 std::stringstream
str;
442 std::stringstream
str;
455 std::stringstream
str;
469 auto weights = bbox_info.
weights();
470 os <<
"(" << bbox_info.
img_width() <<
"x" << bbox_info.
img_height() <<
")~" << bbox_info.
scale() <<
"(weights={" << weights[0] <<
", " << weights[1] <<
", " << weights[2] <<
", " << weights[3] <<
483 std::stringstream
str;
509 std::stringstream
str;
535 std::stringstream
str;
536 str << proposals_info;
550 os <<
"Scale:" << uqinfo.
scale <<
"~";
551 os <<
"Offset:" << uqinfo.
offset;
563 std::stringstream
str;
564 str << quantization_info;
592 os <<
"BOUNDED_RELU";
604 os <<
"LU_BOUNDED_RELU";
637 std::stringstream
str;
660 os <<
"VAL_A=" << info->
a() <<
",";
661 os <<
"VAL_B=" << info->
b();
684 std::stringstream
str;
724 std::stringstream
str;
791 std::stringstream
str;
792 str << rounding_policy;
838 std::stringstream
str;
853 switch(data_layout_dim)
900 os <<
"QASYMM8_SIGNED";
903 os <<
"QSYMM8_PER_CHANNEL";
962 std::stringstream
str;
1044 std::stringstream
str;
1111 std::stringstream
str;
1152 os << border.
top <<
"," 1153 << border.
right <<
"," 1170 for(
auto const &p : padding)
1172 os <<
"{" << p.first <<
"," << p.second <<
"}";
1188 for(
size_t i = 0; i < multiples.size() - 1; i++)
1190 os << multiples[i] <<
", ";
1192 os << multiples.back() <<
")";
1208 os <<
"NEAREST_NEIGHBOR";
1266 const auto scales = qinfo.
scale();
1267 const auto offsets = qinfo.
offset();
1269 os <<
", QuantizationInfo={" 1270 <<
"scales.size=" << scales.size()
1271 <<
", scale(s)=" << scales <<
", ";
1273 os <<
"offsets.size=" << offsets.size()
1274 <<
", offset(s)=" << offsets <<
"}";
1300 std::stringstream
str;
1313 std::stringstream
str;
1326 std::string ret_str =
"nullptr";
1329 std::stringstream
str;
1331 ret_str = str.str();
1344 return to_string(static_cast<const ITensorInfo *>(info));
1355 std::string ret_str =
"nullptr";
1356 if(tensor !=
nullptr)
1358 std::stringstream
str;
1359 str <<
"ITensor->info(): " << tensor->
info();
1360 ret_str = str.str();
1373 return to_string(static_cast<const ITensor *>(tensor));
1384 std::stringstream
str;
1385 str <<
"ITensor.info(): " << tensor.
info();
1389 #ifdef ARM_COMPUTE_OPENCL_ENABLED 1398 std::string ret_str =
"nullptr";
1399 if(cl_tensor !=
nullptr)
1401 std::stringstream
str;
1402 str <<
"ICLTensor->info(): " << cl_tensor->
info();
1403 ret_str = str.str();
1416 return to_string(static_cast<const ICLTensor *>(cl_tensor));
1426 template <
typename T>
1429 std::stringstream
str;
1442 std::stringstream
str;
1455 std::stringstream
str;
1468 std::stringstream
str;
1482 os <<
"{m=" << info.
m() <<
",";
1483 os <<
"n=" << info.
n() <<
",";
1484 os <<
"k=" << info.
k() <<
",";
1510 os <<
"post_ops=" << info.
post_ops() <<
"}";
1524 os <<
"{start=" << dim.
start() <<
", end=" << dim.
end() <<
", step=" << dim.
step() <<
"}";
1559 std::stringstream
str;
1572 std::stringstream
str;
1585 std::stringstream
str;
1598 std::stringstream
str;
1610 std::stringstream
str;
1623 std::string ret_str =
"nullptr";
1626 std::stringstream
str;
1628 ret_str = str.str();
1643 os <<
"+" << rect.
x <<
"+" << rect.
y;
1683 std::stringstream
str;
1697 os << pad_stride_info.
stride().first <<
"," << pad_stride_info.
stride().second;
1713 std::stringstream
str;
1714 str << pad_stride_info;
1726 std::stringstream
str;
1739 std::stringstream
str;
1752 std::stringstream
str;
1765 std::stringstream
str;
1778 std::stringstream
str;
1791 std::stringstream
str;
1822 std::stringstream
str;
1854 os <<
"SQUARED_DIFF";
1874 std::stringstream
str;
1900 os <<
"ARG_IDX_MAX";
1903 os <<
"ARG_IDX_MIN";
1929 std::stringstream
str;
1955 os <<
"GreaterEqual";
2003 os <<
"LOGICAL_NOT";
2020 std::stringstream
str;
2033 std::stringstream
str;
2046 std::stringstream
str;
2059 std::stringstream
str;
2072 std::stringstream
str;
2073 str <<
"{Type=" << info.
pool_type <<
"," 2108 std::stringstream
str;
2122 os << padding3d.
left <<
"," << padding3d.
right <<
"," 2123 << padding3d.
top <<
"," << padding3d.
bottom <<
"," 2124 << padding3d.
front <<
"," << padding3d.
back;
2136 std::stringstream
str;
2150 switch(rounding_type)
2178 <<
"PoolSize=" << info.
pool_size <<
", " 2179 <<
"Stride=" << info.
stride <<
", " 2180 <<
"Padding=" << info.
padding <<
", " 2183 <<
"DimensionRoundingType=" << info.
round_type;
2197 std::stringstream
str;
2210 std::stringstream
str;
2212 str <<
"Clip:" << info.
clip()
2213 <<
"Flip:" << info.
flip()
2214 <<
"StepX:" << info.
steps()[0]
2215 <<
"StepY:" << info.
steps()[1]
2216 <<
"MinSizes:" << info.
min_sizes().size()
2217 <<
"MaxSizes:" << info.
max_sizes().size()
2220 <<
"Offset:" << info.
offset()
2221 <<
"Variances:" << info.
variances().size();
2248 std::stringstream
str;
2277 os <<
"GEMM_CONV2D";
2294 std::stringstream
str;
2311 os <<
"GPU_ARCH_MASK";
2376 std::stringstream
str;
2390 os <<
"{x=" << detection_window.
x <<
"," 2391 <<
"y=" << detection_window.
y <<
"," 2392 <<
"width=" << detection_window.
width <<
"," 2393 <<
"height=" << detection_window.
height <<
"," 2394 <<
"idx_class=" << detection_window.
idx_class <<
"," 2395 <<
"score=" << detection_window.
score <<
"}";
2409 switch(detection_code)
2412 os <<
"CENTER_SIZE";
2418 os <<
"CORNER_SIZE";
2437 std::stringstream
str;
2438 str << detection_code;
2451 os <<
"{Classes=" << detection_info.
num_classes() <<
"," 2453 <<
"CodeType=" << detection_info.
code_type() <<
"," 2455 <<
"KeepTopK=" << detection_info.
keep_top_k() <<
"," 2457 <<
"Eta=" << detection_info.
eta() <<
"," 2460 <<
"TopK=" << detection_info.
top_k() <<
"," 2475 std::stringstream
str;
2476 str << detection_info;
2488 os <<
"{MaxDetections=" << detection_info.
max_detections() <<
"," 2491 <<
"NmsIouThreshold=" << detection_info.
iou_threshold() <<
"," 2492 <<
"NumClasses=" << detection_info.
num_classes() <<
"," 2512 std::stringstream
str;
2513 str << detection_info;
2525 std::stringstream
str;
2526 str << detection_window;
2539 os <<
"Clip:" << info.
clip()
2540 <<
"Flip:" << info.
flip()
2541 <<
"StepX:" << info.
steps()[0]
2542 <<
"StepY:" << info.
steps()[1]
2547 <<
"Offset:" << info.
offset()
2566 std::stringstream
str;
2583 return std::string(
"Exhaustive");
2587 return std::string(
"Normal");
2591 return std::string(
"Rapid");
2596 return std::string(
"UNDEFINED");
2616 return "Reshaped_Only_RHS";
2654 <<
"dilation=" << conv_info.
dilation <<
"}";
2666 std::stringstream
str;
2698 std::stringstream
str;
2718 os <<
"QUANTIZE_DOWN";
2721 os <<
"QUANTIZE_DOWN_FIXEDPOINT";
2724 os <<
"QUANTIZE_DOWN_FLOAT";
2740 std::stringstream
str;
2754 os <<
"{type=" << gemm_info.
type <<
", " 2776 std::stringstream
str;
2790 os <<
"{conv_info=" << conv_info.
conv_info <<
", " 2791 <<
"dilation=" << conv_info.
dilation <<
", " 2794 <<
"num_groups=" << conv_info.
num_groups <<
"," 2795 <<
"post_ops=" << conv_info.
post_ops <<
"}";
2807 std::stringstream
str;
2821 os <<
"{value.u64=" << pixel_value.
get<uint64_t>() <<
"}";
2833 std::stringstream
str;
2848 <<
"BorderMode=" << scale_info.
border_mode <<
", " 2851 <<
"use_padding=" << scale_info.
use_padding <<
", " 2853 <<
"data_layout=" << scale_info.
data_layout <<
"}";
2865 std::stringstream
str;
2901 std::stringstream
str;
2902 str <<
"{" << fft_dir <<
"}";
2915 os <<
"{axis=" << fft1d_info.
axis <<
", " 2916 <<
"direction=" << fft1d_info.
direction <<
"}";
2928 std::stringstream
str;
2942 os <<
"{axis=" << fft2d_info.
axis0 <<
", " 2943 <<
"axis=" << fft2d_info.
axis1 <<
", " 2944 <<
"direction=" << fft2d_info.
direction <<
"}";
2956 std::stringstream
str;
2970 os <<
"{x=" << coord_2d.
x <<
", " 2971 <<
"y=" << coord_2d.
y <<
"}";
2983 std::stringstream
str;
3000 os <<
"CONVOLUTION";
3003 os <<
"DEPTHWISECONVOLUTION";
3019 std::stringstream
str;
3033 os <<
"{beta=" << info.
beta <<
", " 3034 <<
"is_log=" << info.
is_log <<
", " 3036 <<
"axis=" << info.
axis <<
"}";
3048 std::stringstream
str;
3060 template <
typename T>
3061 ::std::ostream &operator<<(::std::ostream &os, const LSTMParams<T> &lstm_params)
3063 os <<
"{input_to_input_weights=" <<
to_string(lstm_params.input_to_input_weights()) <<
", " 3064 <<
"recurrent_to_input_weights=" <<
to_string(lstm_params.recurrent_to_input_weights()) <<
", " 3065 <<
"cell_to_input_weights=" <<
to_string(lstm_params.cell_to_input_weights()) <<
", " 3066 <<
"input_gate_bias=" <<
to_string(lstm_params.input_gate_bias()) <<
", " 3067 <<
"cell_to_forget_weights=" <<
to_string(lstm_params.cell_to_forget_weights()) <<
", " 3068 <<
"cell_to_output_weights=" <<
to_string(lstm_params.cell_to_output_weights()) <<
", " 3069 <<
"projection_weights=" <<
to_string(lstm_params.projection_weights()) <<
", " 3070 <<
"projection_bias=" <<
to_string(lstm_params.projection_bias()) <<
", " 3071 <<
"input_layer_norm_weights=" <<
to_string(lstm_params.input_layer_norm_weights()) <<
", " 3072 <<
"forget_layer_norm_weights=" <<
to_string(lstm_params.forget_layer_norm_weights()) <<
", " 3073 <<
"cell_layer_norm_weights=" <<
to_string(lstm_params.cell_layer_norm_weights()) <<
", " 3074 <<
"output_layer_norm_weights=" <<
to_string(lstm_params.output_layer_norm_weights()) <<
", " 3075 <<
"cell_clip=" << lstm_params.cell_clip() <<
", " 3076 <<
"projection_clip=" << lstm_params.projection_clip() <<
", " 3077 <<
"input_intermediate_scale=" << lstm_params.input_intermediate_scale() <<
", " 3078 <<
"forget_intermediate_scale=" << lstm_params.forget_intermediate_scale() <<
", " 3079 <<
"cell_intermediate_scale=" << lstm_params.cell_intermediate_scale() <<
", " 3080 <<
"hidden_state_zero=" << lstm_params.hidden_state_zero() <<
", " 3081 <<
"hidden_state_scale=" << lstm_params.hidden_state_scale() <<
", " 3082 <<
"has_peephole_opt=" << lstm_params.has_peephole_opt() <<
", " 3083 <<
"has_projection=" << lstm_params.has_projection() <<
", " 3084 <<
"has_cifg_opt=" << lstm_params.has_cifg_opt() <<
", " 3085 <<
"use_layer_norm=" << lstm_params.use_layer_norm() <<
"}";
3095 template <
typename T>
3098 std::stringstream
str;
3150 std::stringstream
str;
3165 <<
"nms=" << info.
nms() <<
", " 3170 <<
"min_size=" << info.
min_size() <<
", " 3171 <<
"im_width=" << info.
im_width() <<
", " 3172 <<
"im_height=" << info.
im_height() <<
"}";
3184 std::stringstream
str;
3197 std::stringstream
str;
3198 str << rounding_type;
3211 os << conv3d_info.
stride;
3234 std::stringstream
str;
BorderMode
Methods available to handle borders.
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
const std::vector< int32_t > & offset() const
Offset vector accessor.
BorderMode border_mode
Border mode policy.
unsigned int top
top of the border
Class describing the value of a pixel for any image format.
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
bool broadcast_bias
Flag used to broadcast the bias addition.
ArithmeticOperation
Available element-wise operations.
InterpolationPolicy
Interpolation method.
int num_classes() const
Get num classes.
int mult_interleave4x4_height() const
Multiplication factor for the height of the 4x4 interleaved block.
int mult_interleave4x4_height
Multiplication factor for the height of the 4x4 interleaved block.
int32_t gemmlowp_multiplier
GEMMLowp output stage multiplier used for quantizing to QASYMM8.
Generate Proposals Information class.
Second channel (used by formats with unknown channel types).
unsigned int axis
Axis to run the FFT on.
FFTDirection direction
Direction of the FFT.
Quantize using a fixed point multiplication.
experimental::PostOpList< ITensorInfo * > post_ops
bool share_location() const
Get share location.
float im_width() const
Get image width (NMS may suppress boxes whose center sits beyond the image width) ...
Descriptor used by the 3d Convolution function.
float scale_value_x() const
Get x scale value.
float score_thresh() const
Get the score threshold.
DataLayout output_data_layout
Data layout to use for the output tensor once the convolution has been applied (NCHW or NHWC) ...
bool fp_mixed_precision
Flag used to indicate wider accumulators (32 bit instead of 16 for FP16).
quantized, symmetric fixed-point 16-bit number
Rounds to nearest value; half rounds away from zero.
Use box centers and size.
Descriptor used by the GEMM kernels.
InterpolationPolicy interpolation_policy
Interpolation type to use.
uint16_t x
Top-left x coordinate.
float score
Confidence value for the detection window.
bool enabled() const
Check if initialised.
std::vector< PaddingInfo > PaddingList
List of padding information.
ReductionOperation
Available reduction operations.
Container for 2D border size.
bool retain_internal_weights
Retain internal reshaped weights.
unsigned int max_detections() const
Get max detections.
ActivationLayerInfo act_info
unsigned int v0
Number of vertical blocks of size (m0xk0) stored on the same output row.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
constexpr int step() const
Return the step of the dimension.
Direct 2D GEMM convolution.
float beta
A scaling factor for the exponent with default value 1.0.
unsigned int depth_output_gemm3d
Depth of the output tensor in case is reinterpreted as 3D.
DataLayoutDimension
[DataLayout enum definition]
Descriptor used by the FFT1D function.
Descriptor used by the FFT2D function.
BoxWithNonMaximaSuppressionLimit Information class.
uint32_t norm_size() const
Get the normalization size.
1 channel, 1 U8 per channel
NormType type() const
Get the normalization type.
int mult_transpose1xW_width() const
Multiplication factor for the width of the 1xW transposed block.
float a() const
Get the alpha value.
GEMM reshape information class.
PadStrideInfo convolution_info
Convolution info (Pads, strides,...)
void get(uint8_t &v) const
Interpret the pixel value as a U8.
PostOpType
Type of Post Op.
std::string to_string(T &&value)
Convert integer and float values to string.
An elementwise n-ary operation that can be appended to and fused with (at kernel-level) other operato...
virtual DataType data_type() const =0
Data type used for each element of the tensor.
Class for specifying the size of a 3D shape or object.
bool are_reshaped() const
Flag which specifies if the weights tensor has been reshaped.
1 channel, 1 F32 per channel
DimensionRoundingType
Dimension rounding type when down-scaling on CNNs.
Searches a subset of LWS configurations while tuning.
Normalization Layer Information class.
Output values are defined by bilinear interpolation between the pixels.
unsigned int h0
Number of horizontal blocks of size (k0xn0) stored on the same output row.
GEMMType gemm_type(TokenStream &in, bool &valid)
Fully connected layer info.
bool align_corners
Align corners of input and output.
bool fp_mixed_precision() const
Flag which specifies if a wider accumulator should be used.
GEMM LHS (Left Hand Side) matrix information.
Store the tensor's metadata.
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
Describe one of the image's dimensions with a start, end and step.
quantized, asymmetric fixed-point 16-bit number
1 channel, 1 U16 per channel
unsigned int bottom
bottom of the border
Reshaped GEMM kernel where only the rhs matrix is reshaped.
int32_t gemmlowp_offset
GEMMLowp output stage offset used for quantizing to QASYMM8.
float eta() const
Get eta.
int depth_output_gemm3d() const
Depth of the output when GEMM output is reinterpreted as 3D tensor.
bool use_padding
Indication of using padding.
unsigned int pooled_width() const
Get the pooled width of the layer.
unsigned int pad_top() const
Get the top padding.
Output values are defined to match the source pixel whose center is nearest to the sample position...
int32_t gemmlowp_max_bound
GEMMLowp max value used to saturate down the output result before converting back to QASYMM8...
bool retain_internal_weights() const
Flag which specifies if the weights tensor has to be retained from previous run.
CLGEMMKernelType
OpenCL GEMM kernel types.
DetectionOutputLayerCodeType
Available Detection Output code types.
ConvolutionMethod
Available ConvolutionMethod.
Reshaped GEMM kernel where both lhs and rhs matrices are reshaped.
Activation Layer Information class.
GEMMLowpOutputStageType type
GEMMLowp output stage type.
decltype(strategy::transforms) typedef type
Interface for CPU tensor.
float spatial_scale() const
A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
bool use_regular_nms() const
Get if use regular nms.
bool transpose
True if the (k0xn0) block has to be transposed before been stored.
bool interleave
True if the v0 (m0xk0) blocks have to be interleaved in the output row.
bool export_to_cl_image
True if the reshaped rhs has to be exported to cl_image.
int top_k() const
Get top K.
float feat_height() const
Copyright (c) 2017-2022 Arm Limited.
bool suppress_size() const
Get if NMS will suppress boxes based on their size/position.
size_t height
Height of the image region or rectangle.
bool is_b_reshaped() const
Flag which specifies if the matrix B has been reshaped.
ActivationFunction
Available activation functions.
1 channel, 1 F16 per channel
Samples are taken at pixel center.
Greater equal comparison ( )
float iou_threshold() const
Get intersection over union threshold.
std::string to_string(const Conv3dInfo &conv3d_info)
Formatted output of the Conv3dInfo type.
NMSType
Available non maxima suppression types.
bool is_quantized_per_channel
GEMMLowp quantized per-channel flag.
Convolution Layer Weights Information class.
1 channel, 1 S32 per channel
bool variance_encoded_in_target() const
Get if variance encoded in target.
16-bit brain floating-point number
bool transpose
True if the (m0xk0) block has to be transposed before been stored.
int n() const
Number of matrix B columns.
Searches a minimal subset of LWS configurations while tuning.
3 channels, 1 U8 per channel
unsigned int depth_multiplier
Multiplier to apply to input's depth to retrieve the output depth.
FuseBatchNormalizationType
Available FuseBatchNormalizationType.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
unsigned int m
Number of LHS rows.
Quantization information.
unsigned int n
Number of RHS columns.
const std::string & string_from_data_type(DataType dt)
Convert a data type identity into a string.
DimensionRoundingType round_type
Exponential Linear Unit ( )
size_t front
Padding across the depth dimenstion on the front, in elements.
std::array< float, 2 > steps() const
Get the step coordinates.
float nms() const
Get the NMS.
float nms_threshold() const
Get nms threshold.
Third channel (used by formats with unknown channel types).
1 channel, 1 U32 per channel
SamplingPolicy sampling_policy
Sampling policy used by the interpolation.
GEMM RHS (Right Hand Side) matrix information.
int32_t b_offset
Offset to be added to each element of the matrix B.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
Normalization applied within the same map in 1D region.
Size2D output_tile_size
Width and height of the output tile.
Channel
Available channels.
Format
Image colour formats.
PaddingMode
Padding mode to use for PadLayer.
DimensionRoundingType round_type
uint16_t width
Width of the detection window.
PadStrideInfo pad_stride_info
Convolution info (Pads, strides,...)
unsigned int n0
Number of columns processed by the matrix multiplication.
ActivationLayerInfo act_info
Fused activation to apply after convolution.
quantized, asymmetric fixed-point 8-bit number unsigned
bool are_weights_reshaped
Reshape the weights tensor if false.
size_t height
Height of the 3D shape or object.
Pooling Layer Information struct.
float scale_value_h() const
Get h scale value.
std::pair< unsigned int, unsigned int > stride() const
Get the stride.
float scale_value_w() const
Get w scale value.
Pooling Layer Information struct.
FFTDirection
FFT direction to use.
DataType input_data_type
Input tensor data type.
Size2D dilation
Dilation, in elements, across x and y.
UniformQuantizationInfo uniform() const
Return per layer quantization info.
bool is_log
Flag used to perform Log Softmax operation.
float nms_score_threshold() const
Get nms threshold.
float soft_nms_min_score_thres() const
Get soft nms min score threshold.
Dimensions with dimensionality.
float gemmlowp_real_multiplier
GEMMLowp output stage real multiplier used for quantizing to QASYMM8.
bool reinterpret_input_as_3d
Flag used to reinterpret the input as 3D.
RoundingPolicy
Rounding method.
GEMMLowp output stage info.
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
Samples are taken at pixel top left corner.
float offset() const
Get the offset.
Fourth channel (used by formats with unknown channel types).
DetectionOutputLayerCodeType code_type() const
Get detection output code type.
unsigned int pad_right() const
Get the right padding.
size_t top
Padding across the height dimenstion on the top, in elements.
const std::vector< float > & scale() const
Scale vector accessor.
int k() const
Number of matrix A columns or matrix B rows.
Quantize using a floating point multiplication.
size_t left
Padding across the width dimenstion on the left, in elements.
size_t width
Width of the 3D shape or object.
Padding and stride information class.
ComparisonOperation
Supported comparison operations.
GEMMLowpOutputStageType
GEMMLowp output stage type.
Coordinates2D img_size() const
Get the image size coordinates.
std::string to_string(const T &val)
Fallback method: try to use std::to_string:
ActivationLayerInfo activation_info
Fused activation to apply after the matrix multiplication.
unsigned int num_kernels() const
Return the number of convolution kernels.
bool reinterpret_input_as_3d() const
Flag which specifies if the input tensor has to be reinterpreted as 3D.
unsigned int left
left of the border
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
unsigned int right
right of the border
::std::ostream & operator<<(::std::ostream &os, const std::vector< T > &args)
Formatted output of a vector of objects.
Num samples, depth, height, width, channels.
Quantize using an integer multiplication.
1 channel, 1 S16 per channel
bool broadcast_bias() const
Flag which specifies whether to broadcast the shape of the bias tensor.
uint16_t idx_class
Index of the class.
bool pretranspose_B() const
Flag which specifies whether b should be pre-transposed if supported.
int keep_top_k() const
Get the number of total bounding boxes to be kept per image.
Descriptor used by the 2d Convolution function.
Output values are determined by averaging the source pixels whose areas fall under the area of the de...
Num samples, channels, depth, height, width.
quantized, symmetric fixed-point 8-bit number
size_t back
Padding across the depth dimenstion on the back, in elements.
Num samples, channels, height, width.
unsigned int max_classes_per_detection() const
Get max_classes per detection.
bool is_a_reshaped() const
Flag which specifies if the matrix A has been reshaped.
float scale_value_y() const
Get y scale value.
uint16_t height
Height of the detection window.
const experimental::PostOpList< ITensorInfo * > & post_ops() const
Post operations to apply after the matrix multiplication.
Strides of an item in bytes.
quantized, symmetric per channel fixed-point 8-bit number
Convolution using Winograd.
A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
float min_size() const
Get size suppression threshold.
Lower and Upper Bounded Rectifier ( )
int32_t a_offset
Offset to be added to each element of the matrix A.
int32_t gemmlowp_shift
GEMMLowp output stage shift used for quantizing to uint8.
Detection Output layer info.
4 channels, 1 U8 per channel
experimental::PostOpList< ITensorInfo * > post_ops
PoolingType
Available pooling types.
size_t right
Padding across the width dimenstion on the right, in elements.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Rounds to nearest value; half rounds to nearest even.
size_t depth
Depth of the 3D shape or object.
Interface for OpenCL tensor.
const std::string & string_from_data_layout(DataLayout dl)
Convert a data layout identity into a string.
Upper Bounded Rectifier ( )
PadStrideInfo pad_stride_info
size_t width
Width of the image region or rectangle.
GPUTarget
Available GPU Targets.
unsigned int pooled_height() const
Get the pooled height of the layer.
int m() const
Number of matrix A rows.
Borders are left undefined.
ROI Pooling Layer Information class.
Pixels outside the image are assumed to have the same value as the closest image pixel.
Native GEMM kernel with configurable block size.
Class for specifying the size of an image or rectangle.
Detection window used for the object detection.
DataLayout weights_trained_layout
Layout that the weights have been trained with.
const QuantizationInfo qinfo
std::vector< float > max_sizes() const
Get max sizes.
ComputeAnchors information class.
CLTunerMode
< OpenCL tuner modes
uint16_t width
Width of the rectangle.
Num samples, height, width, channels.
unsigned int detection_per_class() const
Get detection per class.
bool flip() const
Get the flip value.
2 channel, 1 U8 per channel
uint16_t y
Top-left y coordinate.
unsigned int k
Number of LHS columns or RHS rows.
bool fp_mixed_precision
Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy.
float spatial_scale() const
Get the spatial scale.
Less equal comparison ( )
uint16_t y
Top-left y coordinate.
Detection Output layer info.
bool interleave
True if the h0 (k0xn0) blocks have to be interleaved in the output row.
unsigned int num_classes() const
Get num classes.
Use box centers and size but flip x and y co-ordinates.
For Depthwise Convolution weights.
Use box centers and size.
experimental::PostOpList< ITensorInfo * > post_ops
(EXPERIMENTAL_POST_OPS) Specifies a list of post ops to be fused after the main op.
unsigned int axis1
Axis to run second pass on.
std::vector< float > variances() const
Get min variances.
bool transpose_weights
Transpose weights if true.
Size2D kernel_size
Width and height of the kernel.
Store the tensor's metadata.
PixelValue constant_border_value
Constant value to use for constant border mode policy.
bool reshape_b_only_on_first_run() const
Flag which specifies if the reshape of matrix B should executed only for the first.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
uint16_t x
Top-left x coordinate.
unsigned int m0
Number of rows processed by the matrix multiplication.
FFTDirection direction
Direction of the FFT.
ActivationFunction activation() const
Get the type of activation function.
float b() const
Get the beta value.
quantized, asymmetric fixed-point 8-bit number signed
int32_t axis
The dimension in which to apply softmax.
64-bit floating-point number
constexpr int end() const
Return the end of the dimension.
Descriptor used by the softmax kernels.
int32_t gemmlowp_min_bound
GEMMLowp min value used to saturate down the output result before converting back to QASYMM8...
int mult_transpose1xW_width
Multiplication factor for the width of the 1xW transposed block.
uint16_t height
Height of the rectangle.
ActivationLayerInfo act_info
unsigned int pad_bottom() const
Get the bottom padding.
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
DataLayout data_layout
Data layout to use.
bool clip() const
Get the clip value.
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
DataType output_data_type
Output tensor data type to use if the output is not initialized.
DataType
Available data types.
Truncates the least significant values that are lost in operations.
unsigned int pad_left() const
Get the left padding.
Searches all possible LWS configurations while tuning.
ElementWiseUnary
Available element wise unary operations.
DataLayout
[DataLayout enum definition]
std::vector< uint32_t > Multiples
Information to produce a tiled version of a Tensor.
constexpr int start() const
Return the start of the dimension.
NormType
The normalization type used for the normalization layer.
A sequence of PostOps that can be appended to the end of other operators.
Normalization applied cross maps.
Describe a multidimensional execution window.
ConvertPolicy
Policy to handle integer overflow.
unsigned int axis0
Axis to run first pass on.
int background_label_id() const
Get background label ID.
float im_height() const
Get image height (NMS may suppress boxes whose center sits beyond the image height) ...
float confidence_threshold() const
Get confidence threshold.
Normalization applied within the same map in 2D region.
SamplingPolicy
Available Sampling Policies.
std::pair< unsigned int, unsigned int > kernel_size() const
Return the width and height of the kernel.
int num_loc_classes() const
Get number of location classes.
size_t bottom
Padding across the height dimenstion on the bottom, in elements.
bool soft_nms_enabled() const
Check if soft NMS is enabled.
int detections_per_im() const
Get the number of detections.
std::string to_string_if_not_null(T *arg)
Formatted output if arg is not null.
virtual DataLayout data_layout() const =0
Get the data layout of the tensor.
std::vector< float > min_sizes() const
Get min sizes.
Padding information for 3D operations like Conv3d.