From 236bfe7033a313ab98ff436d85f38a58b0738ed1 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 23 Nov 2017 15:59:55 +0000 Subject: COMPIMID-553: MobileNet use case. Change-Id: I1181abbd5785065f3d57e91844376a4b110938a9 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110701 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- arm_compute/graph/Nodes.h | 1 + arm_compute/graph/nodes/BranchLayer.h | 11 +++++++++++ arm_compute/graph/nodes/DepthwiseConvolutionLayer.h | 8 ++++---- 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'arm_compute/graph') diff --git a/arm_compute/graph/Nodes.h b/arm_compute/graph/Nodes.h index 79407f9ab3..0282e1d2ad 100644 --- a/arm_compute/graph/Nodes.h +++ b/arm_compute/graph/Nodes.h @@ -29,6 +29,7 @@ #include "arm_compute/graph/nodes/BranchLayer.h" #include "arm_compute/graph/nodes/ConvolutionLayer.h" #include "arm_compute/graph/nodes/DepthConvertLayer.h" +#include "arm_compute/graph/nodes/DepthwiseConvolutionLayer.h" #include "arm_compute/graph/nodes/DequantizationLayer.h" #include "arm_compute/graph/nodes/FlattenLayer.h" #include "arm_compute/graph/nodes/FloorLayer.h" diff --git a/arm_compute/graph/nodes/BranchLayer.h b/arm_compute/graph/nodes/BranchLayer.h index 3d13f5f2d3..dd05315909 100644 --- a/arm_compute/graph/nodes/BranchLayer.h +++ b/arm_compute/graph/nodes/BranchLayer.h @@ -64,6 +64,17 @@ public: }, std::move(rest_sub_graphs)...); } + /** Default Constructor + * + * @param[in] sub_graph Sub graph + */ + template + BranchLayer(SubGraph &&sub_graph) + : _branch_merge_method(BranchMergeMethod::DEPTH_CONCATENATE), _sub_graphs() + { + /* TODO:(geopin01) Use traits to make sure variadic arguments are of SubGraph type */ + _sub_graphs.push_back(arm_compute::support::cpp14::make_unique(std::move(sub_graph))); + } // Inherited methods overriden: std::unique_ptr instantiate_node(GraphContext &ctx, ITensorObject *input, ITensorObject *output) override; diff --git a/arm_compute/graph/nodes/DepthwiseConvolutionLayer.h b/arm_compute/graph/nodes/DepthwiseConvolutionLayer.h index 48b2ef9140..8b7e3b8296 100644 --- a/arm_compute/graph/nodes/DepthwiseConvolutionLayer.h +++ b/arm_compute/graph/nodes/DepthwiseConvolutionLayer.h @@ -47,13 +47,13 @@ public: * @param[in] conv_width Convolution width * @param[in] conv_height Convolution height * @param[in] weights Weights values tensor + * @param[in] biases Biases values tensor * @param[in] conv_info Convolution info - * @param[in] biases (Optional) Biases values tensor * @param[in] opt3x3 (Optional) If true executes DepthwiseConvolutionLayer3x3 */ template - DepthwiseConvolutionLayer(unsigned int conv_width, unsigned int conv_height, AccessorType &&weights, const PadStrideInfo conv_info, AccessorType &&biases = nullptr, bool opt3x3 = true) - : _conv_width(conv_width), _conv_height(conv_height), _weights(std::move(weights)), _conv_info(conv_info), _biases(std::move(biases)), _opt3x3(opt3x3) + DepthwiseConvolutionLayer(unsigned int conv_width, unsigned int conv_height, AccessorType &&weights, AccessorType &&biases, const PadStrideInfo conv_info, bool opt3x3 = true) + : _conv_width(conv_width), _conv_height(conv_height), _weights(std::move(weights)), _biases(std::move(biases)), _conv_info(conv_info), _opt3x3(opt3x3) { } @@ -64,8 +64,8 @@ private: unsigned int _conv_width; unsigned int _conv_height; Tensor _weights; - const PadStrideInfo _conv_info; Tensor _biases; + const PadStrideInfo _conv_info; bool _opt3x3; }; } // namespace graph -- cgit v1.2.1