From a4c6188262d6d9f75f019e437f8190bdd56e604d Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Fri, 3 Nov 2017 12:11:55 +0000 Subject: COMPMID-657 - Add PPMAccessor and TopNPredictionsAccessor to GoogleNet Change-Id: Ib6f2f9e73043d2c59b2698c243fb1a9f51c526e9 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94363 Tested-by: Kaizen Reviewed-by: Gian Marco Iodice --- utils/GraphUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'utils/GraphUtils.cpp') diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp index 15767632c8..9a1ed3d7d9 100644 --- a/utils/GraphUtils.cpp +++ b/utils/GraphUtils.cpp @@ -98,6 +98,9 @@ bool PPMAccessor::access_tensor(ITensor &tensor) // Open PPM file ppm.open(_ppm_path); + ARM_COMPUTE_ERROR_ON_MSG(ppm.width() != tensor.info()->dimension(0) || ppm.height() != tensor.info()->dimension(1), + "Failed to load image file: dimensions [%d,%d] not correct, expected [%d,%d].", ppm.width(), ppm.height(), tensor.info()->dimension(0), tensor.info()->dimension(1)); + // Fill the tensor with the PPM content (BGR) ppm.fill_planar_tensor(tensor, _bgr); -- cgit v1.2.1