aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Graph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/Graph.cpp')
-rw-r--r--src/armnn/Graph.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/armnn/Graph.cpp b/src/armnn/Graph.cpp
index 5e2acd55a3..4e02be3531 100644
--- a/src/armnn/Graph.cpp
+++ b/src/armnn/Graph.cpp
@@ -490,9 +490,22 @@ void Graph::InferTensorInfos()
{
for (auto&& input : layer->GetInputSlots())
{
- boost::ignore_unused(input);
- BOOST_ASSERT_MSG(input.GetConnectedOutputSlot()->IsTensorInfoSet(),
- "All inputs must have the TensorInfo set at this point.");
+ const IOutputSlot* source = input.GetConnectedOutputSlot();
+ if (source == NULL)
+ {
+ std::ostringstream message;
+ message << "Input not connected on "
+ << GetLayerTypeAsCString(layer->GetType())
+ << " layer \""
+ << layer->GetName()
+ << "\"";
+ throw LayerValidationException(message.str());
+ }
+
+ if (!source->IsTensorInfoSet())
+ {
+ throw LayerValidationException("All inputs must have the TensorInfo set at this point.");
+ }
}
layer->ValidateTensorShapesFromInputs();
}