aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/FullyConnected.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/reference/workloads/FullyConnected.cpp')
-rw-r--r--src/backends/reference/workloads/FullyConnected.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backends/reference/workloads/FullyConnected.cpp b/src/backends/reference/workloads/FullyConnected.cpp
index 9ec9ea6c6c..47968f4d88 100644
--- a/src/backends/reference/workloads/FullyConnected.cpp
+++ b/src/backends/reference/workloads/FullyConnected.cpp
@@ -5,6 +5,8 @@
#include "FullyConnected.hpp"
+#include <armnn/utility/Assert.hpp>
+
#include "RefWorkloadUtils.hpp"
namespace armnn
@@ -16,7 +18,7 @@ void FullyConnected(const TensorShape& rInputShape,
Encoder<float>& rOutputEncoder,
const TensorShape& rWeightsShape,
Decoder<float>& rWeightDecoder,
- Decoder<float>& rBiasDecoder,
+ Decoder<float>* pBiasDecoder,
const bool biasEnabled,
const unsigned int K,
const bool transposeWeights)
@@ -28,7 +30,9 @@ void FullyConnected(const TensorShape& rInputShape,
const std::vector<float> decodedWeights = rWeightDecoder.DecodeTensor(rWeightsShape);
const TensorShape biasShape{outputSize};
- const std::vector<float> decodedBiases = biasEnabled ? rBiasDecoder.DecodeTensor(biasShape) : std::vector<float>();
+
+ ARMNN_ASSERT(!biasEnabled || pBiasDecoder != nullptr);
+ const std::vector<float> decodedBiases = biasEnabled ? pBiasDecoder->DecodeTensor(biasShape) : std::vector<float>();
for (unsigned int n = 0; n < rInputShape[0]; n++)