diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-03-13 11:31:53 +0000 |
---|---|---|
committer | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-03-13 16:11:38 +0000 |
commit | 104fbd7b533c40f19465c85e884f10ae500e639e (patch) | |
tree | 10b6fb262fe72e5afeb13ba5b8f491fb3c1a825e /src | |
parent | 797b76b1aef38ea3be6f68ae2bf323048e9beff8 (diff) | |
download | ComputeLibrary-104fbd7b533c40f19465c85e884f10ae500e639e.tar.gz |
COMPMID-3221: Add DeconvolutionLayerDescriptor
A new struct for DeconvolutionLayerNode is added for better
extendability.
Change-Id: I935277e8073a8295de7b0059b946cb637085f1ff
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2883
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/graph/GraphBuilder.cpp | 2 | ||||
-rw-r--r-- | src/graph/nodes/DeconvolutionLayerNode.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/graph/GraphBuilder.cpp b/src/graph/GraphBuilder.cpp index e429817d50..218e6ce62d 100644 --- a/src/graph/GraphBuilder.cpp +++ b/src/graph/GraphBuilder.cpp @@ -306,7 +306,7 @@ NodeID GraphBuilder::add_deconvolution_node(Graph &g, NodeParams params, NodeIdx } // Create convolution node and connect - NodeID deconv_nid = g.add_node<DeconvolutionLayerNode>(deconv_info); + NodeID deconv_nid = g.add_node<DeconvolutionLayerNode>(descriptors::DeconvolutionLayerDescriptor{ deconv_info }); g.add_connection(input.node_id, input.index, deconv_nid, 0); g.add_connection(w_nid, 0, deconv_nid, 1); if(has_bias) diff --git a/src/graph/nodes/DeconvolutionLayerNode.cpp b/src/graph/nodes/DeconvolutionLayerNode.cpp index a2e4e2b056..2daeaaccf7 100644 --- a/src/graph/nodes/DeconvolutionLayerNode.cpp +++ b/src/graph/nodes/DeconvolutionLayerNode.cpp @@ -32,8 +32,8 @@ namespace arm_compute { namespace graph { -DeconvolutionLayerNode::DeconvolutionLayerNode(PadStrideInfo info, QuantizationInfo out_quant_info) - : _info(std::move(info)), _out_quant_info(std::move(out_quant_info)) +DeconvolutionLayerNode::DeconvolutionLayerNode(const descriptors::DeconvolutionLayerDescriptor &descriptor) + : descriptor(std::move(descriptor)) { _input_edges.resize(3, EmptyEdgeID); _outputs.resize(1, NullTensorID); @@ -41,7 +41,7 @@ DeconvolutionLayerNode::DeconvolutionLayerNode(PadStrideInfo info, QuantizationI PadStrideInfo DeconvolutionLayerNode::deconvolution_info() const { - return _info; + return descriptor.info; } TensorDescriptor DeconvolutionLayerNode::compute_output_descriptor(const TensorDescriptor &input_descriptor, @@ -87,11 +87,11 @@ 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); + TensorDescriptor output_info = compute_output_descriptor(src->desc(), weights->desc(), descriptor.info); - if(!_out_quant_info.empty()) + if(!descriptor.out_quant_info.empty()) { - output_info.set_quantization_info(_out_quant_info); + output_info.set_quantization_info(descriptor.out_quant_info); } return output_info; |