From d6f26fc022defe1f6220bb6e2874fefc9a4c0cba Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Mon, 28 Oct 2019 10:48:05 +0000 Subject: Fix ExecuteNetwork no longer printing out the inference results, breaking some of the nightly builds * The TensorPrinter must be called regardless of the value of the output tensor files, it will automatically handle an empty file path by only printing the results to the console * Code refactoring Signed-off-by: Matteo Martincigh Change-Id: I548ec7cf6d51badf78643c9a6c1c56ea9200142b --- src/armnnUtils/TensorIOUtils.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/armnnUtils/TensorIOUtils.hpp b/src/armnnUtils/TensorIOUtils.hpp index 47e0a320b8..07f3723279 100644 --- a/src/armnnUtils/TensorIOUtils.hpp +++ b/src/armnnUtils/TensorIOUtils.hpp @@ -37,11 +37,10 @@ inline armnn::InputTensors MakeInputTensors( { if (value.size() != inputBinding.second.GetNumElements()) { - std::ostringstream msg; - msg << "Input tensor has incorrect size (expected " - << inputBinding.second.GetNumElements() << " got " - << value.size(); - throw armnn::Exception(msg.str()); + throw armnn::Exception(boost::str(boost::format("Input tensor has incorrect size " + "(expected %1% got %2%)") + % inputBinding.second.GetNumElements() + % value.size())); } armnn::ConstTensor inputTensor(inputBinding.second, value.data()); -- cgit v1.2.1