From bb123bd6f64444141161562aad06cb406762d47a Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Fri, 3 Jan 2020 10:57:30 +0000 Subject: MLCE-139 add align_corners parameter to NEScale Change-Id: I497ceb54c5fd8af1af8c529f90fd5a00a45263c8 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/2538 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Pablo Marquez --- arm_compute/core/Utils.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'arm_compute/core/Utils.h') diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index 0a7eeefded..3a8f6b319f 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 ARM Limited. + * Copyright (c) 2016-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -967,6 +967,16 @@ bool needs_serialized_reduction(ReductionOperation op, DataType dt, unsigned int */ QuantizationInfo get_softmax_output_quantization_info(DataType input_type, bool is_log); +/** Returns resize ratio between input and output with consideration of aligned corners + * + * @param[in] input_size The input size + * @param[in] output_size the output size + * @param[in] align_corners True to align corners of input and output. Defaults to false. + * + * @return The ratio between input and output (i.e., the input size divided by the output size) + */ +float calculate_resize_ratio(size_t input_size, size_t output_size, bool align_corners = false); + /** Convert a tensor format into a string. * * @param[in] format @ref Format to be translated to string. -- cgit v1.2.1