diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-11-23 15:59:55 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:41:58 +0000 |
commit | 236bfe7033a313ab98ff436d85f38a58b0738ed1 (patch) | |
tree | a07d0b122fa93fb26a24067de6341eaded1a52f7 /src/graph/nodes/ConvolutionLayer.cpp | |
parent | 9c450cc0e0b2e7060fa0a74a5196906bc28d0625 (diff) | |
download | ComputeLibrary-236bfe7033a313ab98ff436d85f38a58b0738ed1.tar.gz |
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 <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/graph/nodes/ConvolutionLayer.cpp')
-rw-r--r-- | src/graph/nodes/ConvolutionLayer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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<arm_compute::IFunction> 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<arm_compute::IFunction> 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); |