diff options
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/utils/misc/ShapeCalculator.h | 6 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLReduceMean.h | 7 | ||||
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEReduceMean.h | 7 |
3 files changed, 17 insertions, 3 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 0be4caf2b5..f2f5a30b6a 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -47,13 +47,13 @@ namespace shape_calculator * * @return the calculated shape */ -inline TensorShape calculate_reduce_mean_shape(ITensor *input, const Coordinates &reduction_axis, bool keep_dims) +inline TensorShape calculate_reduce_mean_shape(ITensorInfo *input, const Coordinates &reduction_axis, bool keep_dims) { const int reduction_ops = reduction_axis.num_dimensions(); Coordinates axis_local = reduction_axis; - const int input_dims = input->info()->num_dimensions(); + const int input_dims = input->num_dimensions(); convert_negative_axis(axis_local, input_dims); - TensorShape out_shape = input->info()->tensor_shape(); + TensorShape out_shape = input->tensor_shape(); // Configure reshape layer if we want to drop the dimensions if(!keep_dims) { diff --git a/arm_compute/runtime/CL/functions/CLReduceMean.h b/arm_compute/runtime/CL/functions/CLReduceMean.h index 88ead9d2ea..c37ee8c5ab 100644 --- a/arm_compute/runtime/CL/functions/CLReduceMean.h +++ b/arm_compute/runtime/CL/functions/CLReduceMean.h @@ -25,7 +25,9 @@ #define ARM_COMPUTE_CL_REDUCE_MEAN_H #include "arm_compute/runtime/CL/ICLSimpleFunction.h" +#include "arm_compute/runtime/CL/functions/CLDequantizationLayer.h" #include "arm_compute/runtime/CL/functions/CLElementwiseOperations.h" +#include "arm_compute/runtime/CL/functions/CLQuantizationLayer.h" #include "arm_compute/runtime/CL/functions/CLReductionOperation.h" #include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" #include "arm_compute/runtime/IMemoryManager.h" @@ -82,8 +84,13 @@ private: std::vector<CLReductionOperation> _reduction_kernels; std::vector<CLTensor> _reduced_outs; CLReshapeLayer _reshape; + CLDequantizationLayer _dequant; + CLQuantizationLayer _requant; int _reduction_ops; bool _keep_dims; + bool _do_requant; + CLTensor _input_no_quant; + CLTensor _output_no_quant; }; } // namespace arm_compute #endif /* ARM_COMPUTE_CL_REDUCE_MEAN_H */ diff --git a/arm_compute/runtime/NEON/functions/NEReduceMean.h b/arm_compute/runtime/NEON/functions/NEReduceMean.h index a1b6e348df..eee3f7f799 100644 --- a/arm_compute/runtime/NEON/functions/NEReduceMean.h +++ b/arm_compute/runtime/NEON/functions/NEReduceMean.h @@ -29,6 +29,8 @@ #include "arm_compute/core/NEON/kernels/NEFillBorderKernel.h" #include "arm_compute/core/Types.h" #include "arm_compute/runtime/MemoryGroup.h" +#include "arm_compute/runtime/NEON/functions/NEDequantizationLayer.h" +#include "arm_compute/runtime/NEON/functions/NEQuantizationLayer.h" #include "arm_compute/runtime/NEON/functions/NEReductionOperation.h" #include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h" #include "arm_compute/runtime/Tensor.h" @@ -71,8 +73,13 @@ private: std::vector<NEReductionOperation> _reduction_kernels; std::vector<Tensor> _reduced_outs; NEReshapeLayer _reshape; + NEDequantizationLayer _dequant; + NEQuantizationLayer _requant; int _reduction_ops; bool _keep_dims; + bool _do_requant; + Tensor _input_no_quant; + Tensor _output_no_quant; }; } // namespace arm_compute #endif /* ARM_COMPUTE_NEON_REDUCE_MEAN_H */ |