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 --- src/graph/nodes/ConvolutionLayer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/graph/nodes/ConvolutionLayer.cpp') diff --git a/src/graph/nodes/ConvolutionLayer.cpp b/src/graph/nodes/ConvolutionLayer.cpp index a7236fc78a..ae4a8d7e6b 100644 --- a/src/graph/nodes/ConvolutionLayer.cpp +++ b/src/graph/nodes/ConvolutionLayer.cpp @@ -189,7 +189,7 @@ std::unique_ptr ConvolutionLayer::instantiate_node(Graph in->info()->data_type(), in->info()->fixed_point_position())); } - if(_biases.tensor() == nullptr) + if(_biases.has_accessor() && _biases.tensor() == nullptr) { _biases.set_info(TensorInfo(TensorShape(_ofm), in->info()->num_channels(), in->info()->data_type(), in->info()->fixed_point_position())); } @@ -200,11 +200,14 @@ std::unique_ptr ConvolutionLayer::instantiate_node(Graph // Check if the weights and biases are loaded bool weights_are_loaded = _weights.tensor() != nullptr; - bool biases_are_loaded = _weights.tensor() != nullptr; + bool biases_are_loaded = _biases.has_accessor() ? _biases.tensor() != nullptr : true; // Set bias and weights target _weights.set_target(_target_hint); - _biases.set_target(_target_hint); + if(_biases.has_accessor()) + { + _biases.set_target(_target_hint); + } // Calculate output shape TensorShape output_shape = calculate_convolution_layer_output_shape(in->info()->tensor_shape(), _weights.info().tensor_shape(), _conv_info); -- cgit v1.2.1