24 #ifndef ARM_COMPUTE_TYPES_H 25 #define ARM_COMPUTE_TYPES_H 234 int end(
unsigned int d)
const 288 constexpr
BorderSize(
unsigned int top_bottom,
unsigned int left_right)
360 return !(*
this == rhs);
582 return _score_thresh;
592 return _detections_per_im;
597 return _soft_nms_enabled;
602 return _soft_nms_method;
607 return _soft_nms_sigma;
612 return _soft_nms_min_score_thres;
617 return _suppress_size;
638 int _detections_per_im;
639 bool _soft_nms_enabled;
641 float _soft_nms_sigma;
642 float _soft_nms_min_score_thres;
662 unsigned int pad_x = 0,
unsigned int pad_y = 0,
664 : _stride(std::make_pair(stride_x, stride_y)),
686 : _stride(std::make_pair(stride_x, stride_y)),
698 std::pair<unsigned int, unsigned int>
stride()
const 708 return (_pad_left == _pad_right) && (_pad_top == _pad_bottom);
716 std::pair<unsigned int, unsigned int>
pad()
const 720 return std::make_pair(_pad_left, _pad_top);
753 return (_pad_left != 0 || _pad_top != 0 || _pad_right != 0 || _pad_bottom != 0);
757 std::pair<unsigned int, unsigned int> _stride;
758 unsigned int _pad_left;
759 unsigned int _pad_top;
760 unsigned int _pad_right;
761 unsigned int _pad_bottom;
808 _aspect_ratios.push_back(1.);
812 bool already_exist =
false;
813 for(
auto ar_new : _aspect_ratios)
815 if(fabs(ar - ar_new) < 1e-6)
817 already_exist =
true;
823 _aspect_ratios.push_back(ar);
826 _aspect_ratios.push_back(1.f / ar);
874 return _aspect_ratios;
878 std::vector<float> _min_sizes;
879 std::vector<float> _variances;
883 std::vector<float> _max_sizes;
884 std::vector<float> _aspect_ratios;
886 std::array<float, 2> _steps;
890 using BBox = std::array<float, 4>;
915 _background_label_id(),
916 _confidence_threshold(),
917 _variance_encoded_in_target(false),
921 _num_loc_classes = _share_location ? 1 : _num_classes;
950 _num_loc_classes = _share_location ? 1 : _num_classes;
960 return _share_location;
970 return _variance_encoded_in_target;
980 return _nms_threshold;
990 return _background_label_id;
995 return _confidence_threshold;
1005 return _num_loc_classes;
1010 bool _share_location;
1013 float _nms_threshold;
1015 int _background_label_id;
1016 float _confidence_threshold;
1017 bool _variance_encoded_in_target;
1019 int _num_loc_classes;
1028 : _max_detections(),
1029 _max_classes_per_detection(),
1030 _nms_score_threshold(),
1035 _detection_per_class(),
1036 _dequantize_scores()
1058 _scales_values(scales_values),
1067 return _max_detections;
1072 return _max_classes_per_detection;
1077 return _detection_per_class;
1082 return _nms_score_threshold;
1087 return _iou_threshold;
1092 return _num_classes;
1097 return _use_regular_nms;
1103 return _scales_values[0];
1109 return _scales_values[1];
1115 return _scales_values[2];
1121 return _scales_values[3];
1126 return _dequantize_scores;
1130 unsigned int _max_detections;
1131 unsigned int _max_classes_per_detection;
1132 float _nms_score_threshold;
1133 float _iou_threshold;
1134 unsigned int _num_classes;
1135 std::array<float, 4> _scales_values;
1136 bool _use_regular_nms;
1137 unsigned int _detection_per_class;
1138 bool _dequantize_scores;
1254 return _pooled_width;
1259 return _pooled_height;
1264 return _spatial_scale;
1269 return _sampling_ratio;
1273 unsigned int _pooled_width;
1274 unsigned int _pooled_height;
1275 float _spatial_scale;
1276 unsigned int _sampling_ratio;
1320 return _pre_nms_topN;
1325 return _post_nms_topN;
1340 return _spatial_scale;
1345 return _values_per_roi;
1352 float _spatial_scale;
1357 size_t _values_per_roi;
1382 return _feat_height;
1394 return _spatial_scale;
1400 return _values_per_roi;
1406 float _spatial_scale;
1407 size_t _values_per_roi;
1439 return _bbox_xform_clip;
1459 return _apply_scale;
1464 return _correct_transform_coords;
1472 bool _correct_transform_coords;
1473 std::array<float, 4> _weights;
1474 float _bbox_xform_clip;
1509 : _act(f), _a(
a), _b(
b), _enabled(true)
1537 bool _enabled = {
false };
1641 const uint32_t size = (_type ==
NormType::IN_MAP_2D) ? _norm_size * _norm_size : _norm_size;
1642 return (_is_scaled) ? (_alpha / size) : _alpha;
1647 uint32_t _norm_size;
1683 return _shrink_axis_mask;
1687 int32_t _begin_mask;
1689 int32_t _shrink_axis_mask;
1698 : _are_reshaped(false), _kernel_width(0), _kernel_height(0), _num_kernels(0), _retain_internal_weights(false)
1719 return _are_reshaped;
1727 return _num_kernels;
1735 return std::make_pair(_kernel_width, _kernel_height);
1739 return _retain_internal_weights;
1744 unsigned int _kernel_width;
1745 unsigned int _kernel_height;
1746 unsigned int _num_kernels;
1747 bool _retain_internal_weights;
1764 : _m(1), _n(1), _k(1), _mult_transpose1xW_width(1), _mult_interleave4x4_height(1), _depth_output_gemm3d(0), _reinterpret_input_as_3d(false), _broadcast_bias(false)
1815 return _mult_transpose1xW_width;
1823 return _mult_interleave4x4_height;
1834 return _depth_output_gemm3d;
1842 return _reinterpret_input_as_3d;
1850 return _broadcast_bias;
1857 int _mult_transpose1xW_width;
1858 int _mult_interleave4x4_height;
1859 int _depth_output_gemm3d;
1860 bool _reinterpret_input_as_3d;
1861 bool _broadcast_bias;
1921 GEMMRHSMatrixInfo(
unsigned int n,
unsigned int k,
unsigned int h,
bool trans,
bool inter,
bool export_to_cl_img)
1943 : _is_a_reshaped(false),
1944 _is_b_reshaped(false),
1945 _reshape_b_only_on_first_run(true),
1946 _depth_output_gemm3d(0),
1947 _reinterpret_input_as_3d(false),
1948 _retain_internal_weights(false),
1949 _gemmlowp_output_stage(),
1950 _fp_mixed_precision(false),
1951 _broadcast_bias(false),
1952 _pretranpose_B(true),
1993 return _is_a_reshaped;
2001 return _is_b_reshaped;
2011 return _reshape_b_only_on_first_run;
2019 return _depth_output_gemm3d;
2027 return _reinterpret_input_as_3d;
2035 return _retain_internal_weights;
2043 return _gemmlowp_output_stage;
2051 _gemmlowp_output_stage = output_stage;
2059 return _fp_mixed_precision;
2067 return _broadcast_bias;
2075 return _pretranpose_B;
2083 _pretranpose_B = flag;
2091 return _activation_info;
2103 bool _is_a_reshaped;
2104 bool _is_b_reshaped;
2105 bool _reshape_b_only_on_first_run;
2106 int _depth_output_gemm3d;
2107 bool _reinterpret_input_as_3d;
2108 bool _retain_internal_weights;
2110 bool _fp_mixed_precision;
2111 bool _broadcast_bias;
2112 bool _pretranpose_B;
float scale_coeff() const
Return the scaling factor of the normalization function.
BorderMode
Methods available to handle borders.
ValidRegion(const Coordinates &an_anchor, const TensorShape &a_shape, size_t num_dimensions)
Constructor for a valid region with specified number of dimensions.
ActivationLayerInfo()=default
void set_pretranpose_B(bool flag)
Set pre-transpose b flag.
DeconvolutionMethod
Available DeconvolutionMethod.
void set(size_t dimension, T value, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
ValidRegion & set(size_t dimension, int start, size_t size)
Accessor to set the value of anchor and shape for one of the dimensions.
ValidRegion & operator=(const ValidRegion &)=default
Allow instances of this class to be copied.
GEMMLHSMatrixInfo(unsigned int m, unsigned int k, unsigned int v, bool trans, bool inter)
unsigned int top
top of the border
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
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.
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).
DepthwiseConvolutionFunction
Available DepthwiseConvolutionFunction.
float kappa() const
Get the kappa value.
Quantize using a fixed point multiplication.
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)
FullyConnectedLayerInfo & set_weights_trained_layout(DataLayout layout)
Sets the weights trained data layout.
DetectionPostProcessLayerInfo(unsigned int max_detections, unsigned int max_classes_per_detection, float nms_score_threshold, float iou_threshold, unsigned int num_classes, std::array< float, 4 > scales_values, bool use_regular_nms=false, unsigned int detection_per_class=100, bool dequantize_scores=true)
Constructor.
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)
DimensionRoundingType round() const
Get the rounding type.
quantized, symmetric fixed-point 16-bit number
void set_activation_info(const ActivationLayerInfo &activation_info)
Set activation layer info.
BorderSize operator *(float scale)
Scale a copy of this border size.
Use box centers and size.
~ValidRegion()=default
Default destructor.
ROIPoolingLayerInfo(unsigned int pooled_width, unsigned int pooled_height, float spatial_scale, unsigned int sampling_ratio=0)
Constructor.
uint16_t x
Top-left x coordinate.
TensorShape shape
Shape of the valid region.
WinogradInfo(Size2D output_tile_sz, Size2D kernel_sz, Size2D input_dims, PadStrideInfo conv_info, DataLayout data_layout)
Default constructor.
float score
Confidence value for the detection window.
bool is_in_map() const
Check if normalization is not cross map.
bool enabled() const
Check if initialised.
GEMMRHSMatrixInfo(unsigned int n, unsigned int k, unsigned int h, bool trans, bool inter, bool export_to_cl_img)
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.
size_t values_per_roi() const
ActivationLayerInfo(ActivationFunction f, float a=0.0f, float b=0.0f)
Default Constructor.
std::map< int, std::vector< BBox > > LabelBBox
unsigned int max_detections() const
Get max detections.
unsigned int v0
Number of vertical blocks of size (m0xk0) stored on the same output row.
Direct 2D GEMM convolution.
DataLayoutDimension
[DataLayout enum definition]
BoxWithNonMaximaSuppressionLimit Information class.
PoolingLayerInfo(PoolingType pool_type, DataLayout data_layout)
Constructor.
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,...)
std::vector< float > aspect_ratios() const
Get aspect ratios.
PriorBoxLayerInfo(const std::vector< float > &min_sizes, const std::vector< float > &variances, float offset, bool flip=true, bool clip=false, const std::vector< float > &max_sizes={}, const std::vector< float > &aspect_ratios={}, const Coordinates2D &img_size=Coordinates2D{ 0, 0 }, const std::array< float, 2 > &steps={ { 0.f, 0.f } })
Constructor.
FullyConnectedLayerInfo & set_transpose_weights(bool should_transpose_weights)
Sets the transpose weights flag.
GEMMLowpOutputStageInfo gemmlowp_output_stage() const
GEMMLowp output stage.
GEMMLHSMatrixInfo()=default
bool are_reshaped() const
Flag which specifies if the weights tensor has been reshaped.
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
DimensionRoundingType
Dimension rounding type when down-scaling on CNNs.
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.
bool is_cross_map() const
Check if normalization is cross map.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
const DataLayout data_layout
Fully connected layer info.
bool fp_mixed_precision() const
Flag which specifies if a wider accumulator should be used.
BilinearInterpolation
Bilinear Interpolation method used by LKTracker.
GEMM LHS (Left Hand Side) matrix information.
bool pretranpose_B() const
Flag which specifies whether b should be pre-transposed if supported.
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
constexpr uint8_t CONSTANT_BORDER_VALUE
Constant value of the border pixels when using BorderMode::CONSTANT.
PoolingLayerInfo()
Default Constructor.
GEMMReshapeInfo(int m, int n, int k, int mult_transpose1xW_width=1, int mult_interleave4x4_height=1, int depth_output_gemm3d=0, bool reinterpret_input_as_3d=false, bool broadcast_bias=false)
Constructor.
quantized, asymmetric fixed-point 16-bit number
1 channel, 1 U16 per channel
unsigned int bottom
bottom of the border
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.
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.
BorderSize & operator *=(float scale)
Scale this border size.
int32_t gemmlowp_max_bound
GEMMLowp max value used to saturate down the output result before converting back to QASYMM8.
DetectionPostProcessLayerInfo()
Default Constructor.
bool retain_internal_weights() const
Flag which specifies if the weights tensor has to be retained from previous run.
DetectionOutputLayerCodeType
Available Detection Output code types.
ConvolutionMethod
Available ConvolutionMethod.
Activation Layer Information class.
GEMMLowpOutputStageType type
GEMMLowp output stage type.
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
constexpr BorderSize(unsigned int top_bottom, unsigned int left_right)
Border with same size for top/bottom and left/right.
Copyright (c) 2017-2021 Arm Limited.
WeightsInfo()
Default constructor.
bool suppress_size() const
Get if NMS will suppress boxes based on their size/position.
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.
BoxNMSLimitInfo(float score_thresh=0.05f, float nms=0.3f, int detections=100, bool soft_nms_enabled=false, NMSType soft_nms_method=NMSType::LINEAR, float soft_nms_sigma=0.5f, float soft_nms_min_score_thres=0.001f, bool suppress_size=false, float min_size=1.0f, float im_width=1.0f, float im_height=1.0f)
Constructor.
GenerateProposalsInfo(float im_width, float im_height, float im_scale, float spatial_scale=1.0, int pre_nms_topN=6000, int post_nms_topN=300, float nms_thres=0.7, float min_size=16.0, size_t values_per_roi=4)
Constructor.
NMSType
Available non maxima suppression types.
bool is_quantized_per_channel
GEMMLowp quantized per-channel flag.
Convolution Layer Weights Information class.
std::vector< int32_t > gemmlowp_shifts
GEMMLowp output stage multiplier used for quantizing to QASYMM8.
DetectionOutputLayerInfo()
Default Constructor.
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.
3 channels, 1 U8 per channel
Optimized Depthwise Convolution.
ConvolutionInfo()=default
unsigned int depth_multiplier
Multiplier to apply to input's depth to retrieve the output depth.
NormalizationLayerInfo(NormType type, uint32_t norm_size=5, float alpha=0.0001f, float beta=0.5f, float kappa=1.f, bool is_scaled=true)
Default Constructor.
FuseBatchNormalizationType
Available FuseBatchNormalizationType.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
GEMMRHSMatrixInfo()=default
Exponential Linear Unit ( )
PoolingLayerInfo(PoolingType pool_type, Size2D pool_size, DataLayout data_layout, PadStrideInfo pad_stride_info=PadStrideInfo(), bool exclude_padding=false, bool fp_mixed_precision=false)
Constructor.
std::array< float, 2 > steps() const
Get the step coordinates.
float nms() const
Get the NMS.
float nms_threshold() const
Get nms threshold.
ConvolutionInfo(const PadStrideInfo &pad_stride_info, unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation)
Third channel (used by formats with unknown channel types).
bool padding_is_symmetric() const
Check whether the padding is symmetric.
bool is_scaled() const
Get the is_scaled value.
1 channel, 1 U32 per channel
GEMM RHS (Right Hand Side) matrix information.
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.
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
size_t values_per_roi() const
bool are_weights_reshaped
Reshape the weights tensor if false.
int start(unsigned int d) const
Return the start of the valid region for the given dimension d.
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.
std::vector< int32_t > gemmlowp_multipliers
GEMMLowp output stage multiplier used for quantizing to QASYMM8.
Size2D dilation
Dilation, in elements, across x and y.
float nms_score_threshold() const
Get nms threshold.
float soft_nms_min_score_thres() const
Get soft nms min score threshold.
BitwiseOperation
Available bitwise operations.
WeightsInfo(bool are_reshaped, unsigned int kernel_width, unsigned int kernel_height, unsigned int num_kernels, bool retain_internal_weights=false)
Constructor.
std::array< float, 4 > BBox
float gemmlowp_real_multiplier
GEMMLowp output stage real multiplier used for quantizing to QASYMM8.
bool dequantize_scores() const
Get dequantize_scores value.
GEMMLowp output stage info.
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
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.
float beta() const
Get the beta value.
int k() const
Number of matrix A columns or matrix B rows.
Quantize using a floating point multiplication.
Padding and stride information class.
ComparisonOperation
Supported comparison operations.
PoolingLayerInfo(PoolingType pool_type, unsigned int pool_size, DataLayout data_layout, PadStrideInfo pad_stride_info=PadStrideInfo(), bool exclude_padding=false, bool fp_mixed_precision=false)
Constructor.
GEMMLowpOutputStageType
GEMMLowp output stage type.
Coordinates2D img_size() const
Get the image size coordinates.
ActivationLayerInfo activation_info
Fused activation to apply after the matrix multiplication.
float spatial_scale() const
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
constexpr BorderSize(unsigned int size) noexcept
Border with equal size around the 2D plane.
GEMMInfo() noexcept
Default constructor.
bool operator!=(const BorderSize &rhs)
Check non-equality with another BorderSize struct.
PriorBoxLayerInfo()
Default Constructor.
unsigned int right
right of the border
y*x if x < 0, x otherwise
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.
int keep_top_k() const
Get the number of total bounding boxes to be kept per image.
Output values are determined by averaging the source pixels whose areas fall under the area of the de...
quantized, symmetric fixed-point 8-bit number
unsigned int sampling_ratio() const
Get sampling ratio.
Num samples, channels, height, width.
unsigned int max_classes_per_detection() const
Get max_classes per detection.
bool broadcast_bias() const
Flag which specifies whether to broadcast the shape of the bias tensor.
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.
PadStrideInfo(unsigned int stride_x, unsigned int stride_y, unsigned int pad_left, unsigned int pad_right, unsigned int pad_top, unsigned int pad_bottom, DimensionRoundingType round)
Constructor.
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 gemmlowp_shift
GEMMLowp output stage shift used for quantizing to uint8.
PadStrideInfo(unsigned int stride_x=1, unsigned int stride_y=1, unsigned int pad_x=0, unsigned int pad_y=0, DimensionRoundingType round=DimensionRoundingType::FLOOR)
Constructor.
Detection Output layer info.
4 channels, 1 U8 per channel
ValidRegion(const Coordinates &an_anchor, const TensorShape &a_shape)
Constructor for a valid region with default number of dimensions.
PoolingType
Available pooling types.
Upper Bounded Rectifier ( )
PadStrideInfo pad_stride_info
GEMMReshapeInfo()
Default constructor.
void set_gemmlowp_output_stage(GEMMLowpOutputStageInfo &output_stage)
Sets GEMMLowp output stage.
constexpr bool empty() const
Check if the entire border is zero.
int32_t shrink_axis_mask() const
std::pair< uint32_t, uint32_t > PaddingInfo
Padding information as a pair of unsigned int start/end.
int end(unsigned int d) const
Return the end of the valid region for the given dimension d.
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.
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.
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
std::vector< float > max_sizes() const
Get max sizes.
ComputeAnchors information class.
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.
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.
int depth_output_gemm3d() const
Depth (third dimension) of the output tensor to be used with the GEMM3D kernel.
constexpr bool uniform() const
Check if the border is the same size on all sides.
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.
std::vector< float > variances() const
Get min variances.
bool transpose_weights
Transpose weights if true.
Size2D kernel_size
Width and height of the kernel.
bool operator==(const BorderSize &rhs)
Check equality with another BorderSize struct.
bool reshape_b_only_on_first_run() const
Flag which specifies if the reshape of matrix B should executed only for the first.
constexpr BorderSize(unsigned int top, unsigned int right, unsigned int bottom, unsigned int left)
Border with different sizes.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
uint16_t x
Top-left x coordinate.
float alpha() const
Get the alpha value.
unsigned int m0
Number of rows processed by the matrix multiplication.
std::pair< unsigned int, unsigned int > pad() const
Get the padding.
DetectionOutputLayerInfo(int num_classes, bool share_location, DetectionOutputLayerCodeType code_type, int keep_top_k, float nms_threshold, int top_k=-1, int background_label_id=-1, float confidence_threshold=std::numeric_limits< float >::lowest(), bool variance_encoded_in_target=false, float eta=1)
Constructor.
void set_num_dimensions(size_t num_dimensions)
Set number of dimensions.
ActivationFunction activation() const
Get the type of activation function.
float b() const
Get the beta value.
quantized, asymmetric fixed-point 8-bit number signed
64-bit floating-point number
Container for valid region of a window.
constexpr BorderSize() noexcept
Empty border, i.e.
int post_nms_topN() const
int32_t gemmlowp_min_bound
GEMMLowp min value used to saturate down the output result before converting back to QASYMM8.
uint16_t height
Height of the rectangle.
unsigned int pad_bottom() const
Get the bottom padding.
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
bool clip() const
Get the clip value.
GEMMInfo(bool is_a_reshaped, bool is_b_reshaped, bool reshape_b_only_on_first_run, int depth_output_gemm3d=0, bool reinterpret_input_as_3d=false, bool retain_internal_weights=false, GEMMLowpOutputStageInfo gemmlowp_output_stage=GEMMLowpOutputStageInfo(), bool fp_mixed_precision=false, bool broadcast_bias=false, const ActivationLayerInfo &activation_info=ActivationLayerInfo()) noexcept
Constructor.
DataType output_data_type
Output tensor data type to use if the output is not initialized.
Size2D input_dimensions
Width and height of the input tensor before the convolution is applied.
DataType
Available data types.
bool reinterpret_input_as_3d() const
Flag which specifies if the input tensor has to be reinterpreted as 3D.
ActivationLayerInfo activation_info() const
Activation layer to apply after the matrix multiplication.
unsigned int pad_left() const
Get the left padding.
ElementWiseUnary
Available element wise unary operations.
DataLayout
[DataLayout enum definition]
std::vector< uint32_t > Multiples
Information to produce a tiled version of a Tensor.
NormType
The normalization type used for the normalization layer.
int32_t begin_mask() const
Normalization applied cross maps.
ConvertPolicy
Policy to handle overflow.
NMSType soft_nms_method() const
Get soft NMS method.
void limit(const BorderSize &limit)
Limit this border size.
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)
TensorShape & set(size_t dimension, size_t value, bool apply_dim_correction=true, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
Coordinates anchor
Anchor for the start of the valid region.
ValidRegion()
Default constructor.
float confidence_threshold() const
Get confidence threshold.
Normalization applied within the same map in 2D region.
bool retain_internal_weights() const
StridedSliceLayerInfo(int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0)
Default Constructor.
SamplingPolicy
Available Sampling Policies.
float soft_nms_sigma() const
Get soft NMS sigma.
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.
bool soft_nms_enabled() const
Check if soft NMS is enabled.
int detections_per_im() const
Get the number of detections.
std::vector< float > min_sizes() const
Get min sizes.
bool has_padding() const
Check whether this has any padding.
ComputeAnchorsInfo(float feat_width, float feat_height, float spatial_scale, size_t values_per_roi=4)
Constructor.