From 6800117df3be825f0ec5c6cc71c4377322f51b99 Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Fri, 6 Mar 2020 16:32:01 +0000 Subject: COMPMID-3221: (DATA_UPDATE) add graph example for EDSR Change-Id: Id74190e2af444da8dab4813fd65016104f3882a9 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2862 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- src/graph/nodes/DeconvolutionLayerNode.cpp | 12 +++++++++--- src/graph/nodes/EltwiseLayerNode.cpp | 15 +++++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/graph/nodes/DeconvolutionLayerNode.cpp b/src/graph/nodes/DeconvolutionLayerNode.cpp index d4a5b769e7..a2e4e2b056 100644 --- a/src/graph/nodes/DeconvolutionLayerNode.cpp +++ b/src/graph/nodes/DeconvolutionLayerNode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -32,8 +32,8 @@ namespace arm_compute { namespace graph { -DeconvolutionLayerNode::DeconvolutionLayerNode(PadStrideInfo info) - : _info(std::move(info)) +DeconvolutionLayerNode::DeconvolutionLayerNode(PadStrideInfo info, QuantizationInfo out_quant_info) + : _info(std::move(info)), _out_quant_info(std::move(out_quant_info)) { _input_edges.resize(3, EmptyEdgeID); _outputs.resize(1, NullTensorID); @@ -88,6 +88,12 @@ TensorDescriptor DeconvolutionLayerNode::configure_output(size_t idx) const ARM_COMPUTE_ERROR_ON(src == nullptr || weights == nullptr); TensorDescriptor output_info = compute_output_descriptor(src->desc(), weights->desc(), _info); + + if(!_out_quant_info.empty()) + { + output_info.set_quantization_info(_out_quant_info); + } + return output_info; } diff --git a/src/graph/nodes/EltwiseLayerNode.cpp b/src/graph/nodes/EltwiseLayerNode.cpp index 568b882425..7970bad5f7 100644 --- a/src/graph/nodes/EltwiseLayerNode.cpp +++ b/src/graph/nodes/EltwiseLayerNode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -30,8 +30,8 @@ namespace arm_compute { namespace graph { -EltwiseLayerNode::EltwiseLayerNode(EltwiseOperation op, ConvertPolicy c_policy, RoundingPolicy r_policy) - : _op(op), _convert_policy(c_policy), _rounding_policy(r_policy) +EltwiseLayerNode::EltwiseLayerNode(EltwiseOperation op, QuantizationInfo out_quant_info, ConvertPolicy c_policy, RoundingPolicy r_policy) + : _op(op), _out_quant_info(out_quant_info), _convert_policy(c_policy), _rounding_policy(r_policy) { _input_edges.resize(2, EmptyEdgeID); _outputs.resize(1, NullTensorID); @@ -71,7 +71,14 @@ TensorDescriptor EltwiseLayerNode::configure_output(size_t idx) const const Tensor *src = input(0); ARM_COMPUTE_ERROR_ON(src == nullptr); - return src->desc(); + auto output_info = src->desc(); + + if(!_out_quant_info.empty()) + { + output_info.set_quantization_info(_out_quant_info); + } + + return output_info; } NodeType EltwiseLayerNode::type() const -- cgit v1.2.1