From a66eaa2a374a50b798159d95431c946fdda22a24 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 21 Dec 2017 19:50:06 +0000 Subject: COMPMID-752 Creating an example for QASYMM8 MobileNet Change-Id: Ic76b3b6adaff8c84ba4d2ca5283d9291c69344f0 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/114466 Tested-by: Jenkins Reviewed-by: Pablo Tello Reviewed-by: Georgios Pinitas --- src/graph/nodes/DepthwiseConvolutionLayer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/graph/nodes/DepthwiseConvolutionLayer.cpp') diff --git a/src/graph/nodes/DepthwiseConvolutionLayer.cpp b/src/graph/nodes/DepthwiseConvolutionLayer.cpp index b4598538c1..1209d0376e 100644 --- a/src/graph/nodes/DepthwiseConvolutionLayer.cpp +++ b/src/graph/nodes/DepthwiseConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,11 +43,14 @@ std::unique_ptr DepthwiseConvolutionLayer::instantiate_n TensorShape shape = in->info()->tensor_shape(); shape.set(Window::DimX, _conv_width); shape.set(Window::DimY, _conv_height); - _weights.set_info(TensorInfo(TensorShape(shape), in->info()->num_channels(), in->info()->data_type(), in->info()->fixed_point_position())); + TensorInfo info = TensorInfo(TensorShape(shape), in->info()->num_channels(), in->info()->data_type(), in->info()->fixed_point_position()); + info.set_quantization_info(_quant_info); + _weights.set_info(std::move(info)); } if(_biases.has_accessor() && _biases.tensor() == nullptr) { - _biases.set_info(TensorInfo(TensorShape(in->info()->dimension(2)), in->info()->num_channels(), in->info()->data_type(), in->info()->fixed_point_position())); + DataType dt = in->info()->data_type(); + _biases.set_info(TensorInfo(TensorShape(in->info()->dimension(2)), in->info()->num_channels(), is_data_type_quantized_asymmetric(dt) ? DataType::S32 : dt, in->info()->fixed_point_position())); } bool weights_is_loaded = _weights.tensor() != nullptr; -- cgit v1.2.1