aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/runtime/CL/functions/CLFFTConvolutionLayer.cpp7
-rw-r--r--src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp b/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp
index 77097d2b6..afb1cab52 100644
--- a/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp
@@ -119,8 +119,11 @@ void CLFFTConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights
ICLTensor *output_to_use = _has_bias ? &_bias_output : output;
// Permute bias
- _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
- _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ if(biases != nullptr)
+ {
+ _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
+ _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ }
// Permute input if needed
_needs_permute = input->info()->data_layout() == DataLayout::NHWC;
diff --git a/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp b/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp
index 962402549..08230074c 100644
--- a/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp
+++ b/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp
@@ -118,8 +118,11 @@ void NEFFTConvolutionLayer::configure(ITensor *input, const ITensor *weights, co
ITensor *output_to_use = _has_bias ? &_bias_output : output;
// Permute bias
- _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
- _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ if(biases != nullptr)
+ {
+ _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
+ _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ }
// Permute input if needed
_needs_permute = input->info()->data_layout() == DataLayout::NHWC;