diff options
author | Pablo Tello <pablo.tello@arm.com> | 2018-11-15 14:43:10 +0000 |
---|---|---|
committer | Anthony Barbier <Anthony.barbier@arm.com> | 2018-11-19 09:58:20 +0000 |
commit | 32521430ad67172d372721979e8a32b7d4317620 (patch) | |
tree | c18921290341c1d730fbff406960dc7ea7f61306 /arm_compute/core | |
parent | d696cb6d18c2fe66f1abce88bbd14faf2137ef89 (diff) | |
download | ComputeLibrary-32521430ad67172d372721979e8a32b7d4317620.tar.gz |
COMPMID-1750: Add PriorBox operator to graph API.
Change-Id: I5d2ed5dcc342abff8124762f7bdee587cdf20032
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/Types.h | 3 | ||||
-rw-r--r-- | arm_compute/core/utils/misc/ShapeCalculator.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index 38094ee56a..ef25dc4150 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -857,7 +857,8 @@ public: * @param[in] steps (Optional) Step values. */ 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 } }) + 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 } }) : _min_sizes(min_sizes), _variances(variances), _offset(offset), diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 5c9457ed6b..da9ff56fd0 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -646,13 +646,13 @@ inline TensorShape compute_space_to_batch_shape(const ITensorInfo *input, const return output_shape; } + inline TensorShape compute_prior_box_shape(const ITensorInfo &input, const PriorBoxLayerInfo &info) { DataLayout data_layout = input.data_layout(); const size_t idx_w = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH); const size_t idx_h = get_data_layout_dimension_index(data_layout, DataLayoutDimension::HEIGHT); - - const int num_priors = info.aspect_ratios().size() * info.min_sizes().size() + info.max_sizes().size(); + const int num_priors = info.aspect_ratios().size() * info.min_sizes().size() + info.max_sizes().size(); TensorShape output_shape{}; output_shape.set(0, input.dimension(idx_w) * input.dimension(idx_h) * num_priors * 4); |