diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-10-18 13:07:49 +0100 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-10-20 16:03:04 +0100 |
commit | 5d7b0a314b3e354a6cbcf15f5dd78b50f1e02774 (patch) | |
tree | 3d844c4575193ffddfe3a17c51cb808c9f16ddb0 /src/armnn/Graph.cpp | |
parent | 73010788725f8f07efb6df20711ece712ee213ea (diff) | |
download | armnn-5d7b0a314b3e354a6cbcf15f5dd78b50f1e02774.tar.gz |
Add ConstTensorsAsInput support for Conv3d
* Constant weights and biases are now stored as Constant layers.
* Updated Serializer, Deserializer and unit tests to reflect this.
* Updated TfLiteParser.
* Updated Ref backend to handle constant weights and
bias as inputs rather than reading from member variables.
* Added Conv3d EndToEnd test.
* Added NCDHW DataLayout and unit tests.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I10cdd354ca5f1c748730f92ffdb36bf810f83c8e
Diffstat (limited to 'src/armnn/Graph.cpp')
-rw-r--r-- | src/armnn/Graph.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/armnn/Graph.cpp b/src/armnn/Graph.cpp index 30639b12e8..0591bea99a 100644 --- a/src/armnn/Graph.cpp +++ b/src/armnn/Graph.cpp @@ -588,7 +588,7 @@ void Graph::InferTensorInfos() } /// Throws exception due to a layer input not being connected to an output slot. -/// Verifies weights and bias are set for FullyConnected layers on input slots 1 +/// Verifies weights and bias are set for layers on input slots 1 /// and 2 respectively. Method checks if bias is enabled before ensuring it is set. /// /// @param layer constant pointer to a Layer object @@ -600,7 +600,8 @@ void Graph::ConstructErrorMessageForUnconnectedInputs(Layer* const layer, std::ostringstream message; bool noWeightsAndBias = false; - if (layer->GetType() == armnn::LayerType::FullyConnected && slotIndex > 0) + if ((layer->GetType() == armnn::LayerType::FullyConnected || + layer->GetType() == armnn::LayerType::Convolution3d) && slotIndex > 0) { // If weights are not set and is bias enabled, also check if bias is set if (slotIndex == 1 && layer->GetNumInputSlots() == 3) @@ -608,7 +609,7 @@ void Graph::ConstructErrorMessageForUnconnectedInputs(Layer* const layer, const IOutputSlot* biasSource = layer->GetInputSlot(2).GetConnectedOutputSlot(); if (biasSource == NULL) { - message << "FullyConnected layer weights and bias not set: "; + message << layer->GetName() << " layer weights and bias not set: "; noWeightsAndBias = true; } } @@ -618,11 +619,11 @@ void Graph::ConstructErrorMessageForUnconnectedInputs(Layer* const layer, { if (slotIndex == 1) { - message << "FullyConnected layer weights not set: "; + message << layer->GetName() << " layer weights not set: "; } else { - message << "FullyConnected layer bias not set: "; + message << layer->GetName() << " layer bias not set: "; } } } |